fix: slight improvments

This commit is contained in:
Laureηt 2021-04-16 13:48:57 +02:00
parent 91008f575b
commit 0355d98baf

View file

@ -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