3 Commits

Author SHA1 Message Date
Ticho Hidding
3a8b1c2454 shitty fix for player selector spacing issue v2 2025-12-08 16:12:42 +01:00
Ticho Hidding
846898988f shitty fix for player selector spacing issue 2025-12-08 15:59:11 +01:00
Ticho Hidding
ecd0fd26be changed "fullscreen exit key combination" from esc to F11 2025-12-08 15:11:17 +01:00
2 changed files with 19 additions and 4 deletions

View File

@@ -2,6 +2,8 @@ package org.toop.app;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.scene.input.KeyCode; import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.KeyEvent; import javafx.scene.input.KeyEvent;
import org.toop.app.widget.Primitive; import org.toop.app.widget.Primitive;
@@ -67,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();
@@ -87,6 +89,12 @@ public final class App extends Application {
setKeybinds(root); setKeybinds(root);
stage.setFullScreenExitKeyCombination(
new KeyCodeCombination(
KeyCode.F11
)
);
LoadingWidget loading = new LoadingWidget(Primitive.text( LoadingWidget loading = new LoadingWidget(Primitive.text(
"Loading...", false), 0, 0, Integer.MAX_VALUE, false, false // Just set a high default "Loading...", false), 0, 0, Integer.MAX_VALUE, false, false // Just set a high default
); );

View File

@@ -23,7 +23,7 @@ public class PlayerInfoWidget {
} }
private ToggleWidget buildToggle() { private ToggleWidget buildToggle() {
return new ToggleWidget( return new ToggleWidget(
"computer", "player", "computer", "player",
information.isHuman, information.isHuman,
isHuman -> { isHuman -> {
@@ -37,7 +37,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 +52,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"),