diff options
Diffstat (limited to 'src/main/java/net/sowgro/npehero/Driver.java')
-rwxr-xr-x | src/main/java/net/sowgro/npehero/Driver.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/net/sowgro/npehero/Driver.java b/src/main/java/net/sowgro/npehero/Driver.java index 411bf87..89381aa 100755 --- a/src/main/java/net/sowgro/npehero/Driver.java +++ b/src/main/java/net/sowgro/npehero/Driver.java @@ -54,6 +54,13 @@ public class Driver extends Application StackPane root = new StackPane(backgroundImage2, backgroundImage, primaryPane); Scene primaryScene = new Scene(root, 800,600); + primaryPane.scaleXProperty().bind(Settings.guiScale); + primaryPane.scaleYProperty().bind(Settings.guiScale); + primaryPane.minHeightProperty().bind(root.heightProperty().divide(Settings.guiScale)); + primaryPane.minWidthProperty() .bind(root.widthProperty() .divide(Settings.guiScale)); + primaryPane.maxHeightProperty().bind(root.heightProperty().divide(Settings.guiScale)); + primaryPane.maxWidthProperty() .bind(root.widthProperty() .divide(Settings.guiScale)); + // Cant figure out how to center this backgroundImage.fitHeightProperty().bind(primaryScene.heightProperty()); backgroundImage2.fitHeightProperty().bind(primaryScene.heightProperty()); |