Add WindowMaximized creation parameter and isWindowMaximized() (#142)

This commit is contained in:
DS
2023-02-06 15:05:44 +01:00
committed by GitHub
parent 8f13ae81e5
commit 51dffc416a
10 changed files with 120 additions and 54 deletions

View File

@ -156,6 +156,12 @@ namespace irr
/** \return True if window is minimized. */
virtual bool isWindowMinimized() const = 0;
//! Checks if the Irrlicht window is maximized
//! Only fully works on SDL. Returns false, or the last value set via
//! maximizeWindow() and restoreWindow(), on other backends.
/** \return True if window is maximized. */
virtual bool isWindowMaximized() const = 0;
//! Checks if the Irrlicht window is running in fullscreen mode
/** \return True if window is fullscreen. */
virtual bool isFullscreen() const = 0;

View File

@ -30,6 +30,7 @@ namespace irr
Bits(32),
ZBufferBits(24),
Fullscreen(false),
WindowMaximized(false),
WindowResizable(2),
Stencilbuffer(true),
Vsync(false),
@ -73,6 +74,7 @@ namespace irr
Bits = other.Bits;
ZBufferBits = other.ZBufferBits;
Fullscreen = other.Fullscreen;
WindowMaximized = other.WindowMaximized;
WindowResizable = other.WindowResizable;
Stencilbuffer = other.Stencilbuffer;
Vsync = other.Vsync;
@ -127,6 +129,9 @@ namespace irr
/** Otherwise the device runs in windowed mode. Default: false. */
bool Fullscreen;
//! Maximised window. (Only supported on SDL.) Default: false
bool WindowMaximized;
//! Should a non-fullscreen window be resizable.
/** Might not be supported by all devices. Ignored when Fullscreen is true.
Values: 0 = not resizable, 1 = resizable, 2 = system decides default itself