mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
shitty fix for player selector spacing issue
This commit is contained in:
@@ -69,8 +69,8 @@ public final class App extends Application {
|
|||||||
|
|
||||||
scene.getRoot();
|
scene.getRoot();
|
||||||
|
|
||||||
stage.setMinWidth(1080);
|
stage.setMinWidth(1200);
|
||||||
stage.setMinHeight(720);
|
stage.setMinHeight(800);
|
||||||
stage.setOnCloseRequest(event -> {
|
stage.setOnCloseRequest(event -> {
|
||||||
event.consume();
|
event.consume();
|
||||||
quit();
|
quit();
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ public class PlayerInfoWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ToggleWidget buildToggle() {
|
private ToggleWidget buildToggle() {
|
||||||
|
if(container != null) {
|
||||||
|
container.setMinHeight(container.getHeight());
|
||||||
|
container.setPrefHeight(container.getHeight());
|
||||||
|
container.setMaxHeight(container.getHeight());
|
||||||
|
}
|
||||||
return new ToggleWidget(
|
return new ToggleWidget(
|
||||||
"computer", "player",
|
"computer", "player",
|
||||||
information.isHuman,
|
information.isHuman,
|
||||||
@@ -37,7 +42,14 @@ public class PlayerInfoWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Node buildContent() {
|
private Node buildContent() {
|
||||||
|
|
||||||
if (information.isHuman) {
|
if (information.isHuman) {
|
||||||
|
var spacer = Primitive.vbox(
|
||||||
|
makeAIButton(0, 0, "zwartepiet"),
|
||||||
|
makeAIButton(0, 0, "sinterklaas"),
|
||||||
|
makeAIButton(0, 0, "santa")
|
||||||
|
); //todo make a better solution
|
||||||
|
spacer.setVisible(false);
|
||||||
var nameInput = new LabeledInputWidget(
|
var nameInput = new LabeledInputWidget(
|
||||||
"name",
|
"name",
|
||||||
"enter-your-name",
|
"enter-your-name",
|
||||||
@@ -45,7 +57,7 @@ public class PlayerInfoWidget {
|
|||||||
newName -> information.name = newName
|
newName -> information.name = newName
|
||||||
);
|
);
|
||||||
|
|
||||||
return nameInput.getNode();
|
return Primitive.vbox(spacer,nameInput.getNode());
|
||||||
} else {
|
} else {
|
||||||
var AIBox = Primitive.vbox(
|
var AIBox = Primitive.vbox(
|
||||||
makeAIButton(0, 1, "zwartepiet"),
|
makeAIButton(0, 1, "zwartepiet"),
|
||||||
|
|||||||
Reference in New Issue
Block a user