diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java index a0379ea..d0bbca3 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java @@ -95,6 +95,8 @@ public void start(final Stage stage) throws Exception { stage.setScene(scene); stage.setWidth(ConfigValues.VIEWPORT_WIDTH.getValue()); stage.setHeight(ConfigValues.VIEWPORT_HEIGHT.getValue()); + stage.setMinWidth(ConfigValues.MIN_VIEWPORT_WIDTH.getValue()); + stage.setMinHeight(ConfigValues.MIN_VIEWPORT_HEIGHT.getValue()); ThemeManager.getInstance().registerScene(scene); diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/utils/ConfigValues.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/utils/ConfigValues.java index 6034df8..504e90e 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/utils/ConfigValues.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/utils/ConfigValues.java @@ -2,28 +2,38 @@ /** * Enum containing configuration values for the application. - * */ + */ public enum ConfigValues { /** * Standard viewport width. - * */ - VIEWPORT_WIDTH(600), + */ + VIEWPORT_WIDTH(800), /** * Standard viewport height. - * */ - VIEWPORT_HEIGHT(600); + */ + VIEWPORT_HEIGHT(700), + + /** + * Minimum viewport width. The window cannot be resized smaller than this. + */ + MIN_VIEWPORT_WIDTH(800), + + /** + * Minimum viewport height. The window cannot be resized smaller than this. + */ + MIN_VIEWPORT_HEIGHT(700); /** * Integer parameter of a config value. - * */ + */ private final int value; /** * Constructor. * * @param value the value to assign this configuration. - * */ + */ ConfigValues(final int value) { this.value = value; } @@ -32,7 +42,7 @@ public enum ConfigValues { * Getter method for value. * * @return value of the configuration. - * */ + */ public int getValue() { return value; }