shitty fix for player selector spacing issue

This commit is contained in:
Ticho Hidding
2025-12-08 15:59:11 +01:00
parent ecd0fd26be
commit 846898988f
2 changed files with 16 additions and 4 deletions

View File

@@ -69,8 +69,8 @@ public final class App extends Application {
scene.getRoot();
stage.setMinWidth(1080);
stage.setMinHeight(720);
stage.setMinWidth(1200);
stage.setMinHeight(800);
stage.setOnCloseRequest(event -> {
event.consume();
quit();

View File

@@ -23,7 +23,12 @@ public class PlayerInfoWidget {
}
private ToggleWidget buildToggle() {
return new ToggleWidget(
if(container != null) {
container.setMinHeight(container.getHeight());
container.setPrefHeight(container.getHeight());
container.setMaxHeight(container.getHeight());
}
return new ToggleWidget(
"computer", "player",
information.isHuman,
isHuman -> {
@@ -37,7 +42,14 @@ public class PlayerInfoWidget {
}
private Node buildContent() {
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(
"name",
"enter-your-name",
@@ -45,7 +57,7 @@ public class PlayerInfoWidget {
newName -> information.name = newName
);
return nameInput.getNode();
return Primitive.vbox(spacer,nameInput.getNode());
} else {
var AIBox = Primitive.vbox(
makeAIButton(0, 1, "zwartepiet"),