diff options
Diffstat (limited to 'backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3WindowConfiguration.java')
-rw-r--r-- | backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3WindowConfiguration.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3WindowConfiguration.java b/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3WindowConfiguration.java index edbac858c..16eaecfbe 100644 --- a/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3WindowConfiguration.java +++ b/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3WindowConfiguration.java @@ -25,6 +25,7 @@ public class Lwjgl3WindowConfiguration { int windowY = -1; int windowWidth = 640; int windowHeight = 480; + int windowMinWidth = -1, windowMinHeight = -1, windowMaxWidth = -1, windowMaxHeight = -1; boolean windowResizable = true; boolean windowDecorated = true; Lwjgl3WindowListener windowListener; @@ -61,7 +62,7 @@ public class Lwjgl3WindowConfiguration { /** * Sets the position of the window in windowed mode on the - * primary monitor. Default -1 for booth coordinates for centered. + * primary monitor. Default -1 for both coordinates for centered. */ public void setWindowPosition(int x, int y) { windowX = x; @@ -69,6 +70,17 @@ public class Lwjgl3WindowConfiguration { } /** + * Sets minimum and maximum size limits for the window. If the window is full screen or not resizable, these + * limits are ignored. The default for all four parameters is -1, which means unrestricted. + */ + public void setWindowSizeLimits(int minWidth, int minHeight, int maxWidth, int maxHeight) { + windowMinWidth = minWidth; + windowMinHeight = minHeight; + windowMaxWidth = maxWidth; + windowMaxHeight = maxHeight; + } + + /** * Sets the {@link Lwjgl3WindowListener} which will be informed about * iconficiation, focus loss and window close events. */ |