aboutsummaryrefslogtreecommitdiff
path: root/src/gui/Driver.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-05-18 08:51:31 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-05-18 08:51:31 -0400
commitfe9794bdc8270b43ed5ae847d65ea2a2eecd4a79 (patch)
tree6417e66b2de9f67647ae9e0d6b853858da466275 /src/gui/Driver.java
parentbbad14a33c614ac3480c599dd72a06e14a86295c (diff)
downloadNPEhero-fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79.tar.gz
NPEhero-fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79.tar.bz2
NPEhero-fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79.zip
fix resizing and the bottom being too long
Diffstat (limited to 'src/gui/Driver.java')
-rw-r--r--src/gui/Driver.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/Driver.java b/src/gui/Driver.java
index 59002c2..56bc36a 100644
--- a/src/gui/Driver.java
+++ b/src/gui/Driver.java
@@ -36,10 +36,12 @@ public class Driver extends Application
menus.put("Leaderboard", new Leaderboard());
for (Pane value : menus.values()) {
- value.minWidthProperty().bind(primaryStage.widthProperty());
- value.minHeightProperty().bind(primaryStage.heightProperty());
+ System.out.println(primaryStage.heightProperty());
+ value.prefHeightProperty().bind(primaryPane.heightProperty());
+ value.prefWidthProperty().bind(primaryPane.widthProperty());
}
+
Scene primaryScene = new Scene(primaryPane, 800, 600);
primaryScene.getStylesheets().add("gui/style.css");
@@ -69,8 +71,8 @@ public class Driver extends Application
{
primaryPane.getChildren().remove(0);
}
- pane.minWidthProperty().bind(primaryStage.widthProperty());
- pane.minHeightProperty().bind(primaryStage.heightProperty());
+ pane.prefWidthProperty().bind(primaryPane.widthProperty());
+ pane.prefHeightProperty().bind(primaryPane.heightProperty());
primaryPane.getChildren().add(pane);
primaryPane.requestFocus();
}