From 0355d98baf51cdabd165a72d650450be7db8e359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 16 Apr 2021 13:48:57 +0200 Subject: [PATCH] fix: slight improvments --- core/src/sagittarius/view/SettingsScreen.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/sagittarius/view/SettingsScreen.java b/core/src/sagittarius/view/SettingsScreen.java index 4639bc3..2480c17 100644 --- a/core/src/sagittarius/view/SettingsScreen.java +++ b/core/src/sagittarius/view/SettingsScreen.java @@ -24,18 +24,19 @@ public class SettingsScreen extends BaseScreen { VisTable table = new VisTable(true); table.setFillParent(true); mainStage.addActor(table); - + VisLabel errorLabel = new VisLabel(); errorLabel.setColor(Color.RED); VisValidatableTextField gConstField = new VisValidatableTextField(); - + gConstField.setText(Float.toString(GameScreen.G)); + VisTextButton saveButton = new VisTextButton("Save"); saveButton.addListener(new ActorGestureListener() { @Override public void tap(InputEvent event, float x, float y, int count, int button) { super.tap(event, x, y, count, button); - + GameScreen.G = Float.parseFloat(gConstField.getText()); } @@ -62,9 +63,9 @@ public class SettingsScreen extends BaseScreen { table.add(new VisLabel("G constant:")); table.add(gConstField); table.row(); - table.add(saveButton); + table.add(saveButton).colspan(2); table.row(); - table.add(returnButton); + table.add(returnButton).colspan(2); } @Override