From ae201f8729b614fc9e08df8982ba320b116d980e Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Tue, 23 Jul 2024 19:33:01 +0200 Subject: [PATCH] Fix no window size limits not working at all --- .../sosengine/graphics/classes/Window.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java index db3511d0..54d67748 100644 --- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java @@ -205,17 +205,23 @@ public abstract class Window { /** * Determines the minimum size of this window. + *

+ * If set to {@code -1}, will enforce no minimum window size. * * @since v1-alpha1 * * -- GETTER -- * Returns the minimum window size. + *

+ * If set to {@code -1}, will enforce no minimum window size. * * @return minimum window size * @since v1-alpha2 * * -- SETTER -- * Sets the minimum window size. + *

+ * If set to {@code -1}, will enforce no minimum window size. * * @param size new minimum window size * @since v1-alpha2 @@ -226,17 +232,23 @@ public abstract class Window { /** * Determines the maximum size of this window. + *

+ * If set to {@code -1}, will enforce no maximum window size. * * @since v1-alpha1 * * -- GETTER -- * Returns the maximum window size. + *

+ * If set to {@code -1}, will enforce no maximum window size. * * @return maximum window size * @since v1-alpha2 * * -- SETTER -- * Sets the maximum window size. + *

+ * If set to {@code -1}, will enforce no maximum window size. * * @param size new maximum window size * @since v1-alpha2 @@ -869,9 +881,9 @@ public abstract class Window { // Set defaults if (minimumSize == null) - minimumSize = new Vec2i(0, 0); + minimumSize = new Vec2i(-1, -1); if (maximumSize == null) - maximumSize = new Vec2i(0, 0); + maximumSize = new Vec2i(-1, -1); if (windowMode == null) windowMode = WindowMode.WINDOWED; if (vsyncMode == null)