aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/sowgro/npehero/editor
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2024-08-29 00:19:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2024-08-29 00:19:47 -0400
commit7a3aa914a7a64952dd0e134cd998d0cf0e445b4f (patch)
treefec635bdb98dc1f5d5c5eba9a93fdb9b7e41bf3a /src/main/java/net/sowgro/npehero/editor
parent721eb61fc0f2db09611a220d523be764e0817da6 (diff)
downloadNPEhero-7a3aa914a7a64952dd0e134cd998d0cf0e445b4f.tar.gz
NPEhero-7a3aa914a7a64952dd0e134cd998d0cf0e445b4f.tar.bz2
NPEhero-7a3aa914a7a64952dd0e134cd998d0cf0e445b4f.zip
Make sizing of centerBoxes consistent
Diffstat (limited to 'src/main/java/net/sowgro/npehero/editor')
-rwxr-xr-xsrc/main/java/net/sowgro/npehero/editor/DiffEditor.java2
-rwxr-xr-xsrc/main/java/net/sowgro/npehero/editor/DiffList.java4
-rwxr-xr-xsrc/main/java/net/sowgro/npehero/editor/LevelList.java1
3 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/net/sowgro/npehero/editor/DiffEditor.java b/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
index 8591019..f306d60 100755
--- a/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
+++ b/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
@@ -109,7 +109,7 @@ public class DiffEditor extends Page
scroll.getStyleClass().remove("scroll-pane");
scroll.getStyleClass().add("box");
// scroll.setPrefHeight(400);
- System.out.println("dbg"+scroll.heightProperty());
+// System.out.println("dbg"+scroll.heightProperty());
// TODO scroll.heightProperty is 0 here until the window is resized, idk what to do
scroll.prefWidthProperty().bind(scroll.heightProperty().multiply(0.66));
diff --git a/src/main/java/net/sowgro/npehero/editor/DiffList.java b/src/main/java/net/sowgro/npehero/editor/DiffList.java
index 7369457..b77af55 100755
--- a/src/main/java/net/sowgro/npehero/editor/DiffList.java
+++ b/src/main/java/net/sowgro/npehero/editor/DiffList.java
@@ -8,14 +8,11 @@ import javafx.scene.control.*;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
-import javafx.scene.paint.Color;
import net.sowgro.npehero.Driver;
-import net.sowgro.npehero.gui.MainMenu;
import net.sowgro.npehero.levelapi.Difficulty;
import net.sowgro.npehero.levelapi.Level;
import net.sowgro.npehero.main.Page;
import net.sowgro.npehero.main.Sound;
-import net.sowgro.npehero.main.ValidIndicator;
import java.io.IOException;
import java.nio.file.FileAlreadyExistsException;
@@ -204,6 +201,7 @@ public class DiffList extends Page
centerBox.getChildren().addAll(main, exit);
centerBox.setSpacing(10);
centerBox.setAlignment(Pos.CENTER);
+ centerBox.maxWidthProperty().bind(content.widthProperty().multiply(0.95));
content.getChildren().add(centerBox);
content.setAlignment(Pos.CENTER);
diff --git a/src/main/java/net/sowgro/npehero/editor/LevelList.java b/src/main/java/net/sowgro/npehero/editor/LevelList.java
index d22438e..7c499b7 100755
--- a/src/main/java/net/sowgro/npehero/editor/LevelList.java
+++ b/src/main/java/net/sowgro/npehero/editor/LevelList.java
@@ -153,6 +153,7 @@ public class LevelList extends Page
centerBox.getChildren().addAll(main, exit);
centerBox.setSpacing(10);
centerBox.setAlignment(Pos.CENTER);
+ centerBox.maxWidthProperty().bind(content.widthProperty().multiply(0.95));
content.getChildren().add(centerBox);
content.setAlignment(Pos.CENTER);