Difference between revisions of "love.window.getMode"

(Updated flags table for 0.9.x.)
m (Added New feature, Old new feature templates)
 
(6 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
{{param|number|width|Window width.}}
 
{{param|number|width|Window width.}}
 
{{param|number|height|Window height.}}
 
{{param|number|height|Window height.}}
{{param|table|flags|The flags table with the options:}}
+
{{param|table|flags|Table with the window properties:}}
 
{{subparam|boolean|fullscreen|Fullscreen (true), or windowed (false).}}
 
{{subparam|boolean|fullscreen|Fullscreen (true), or windowed (false).}}
 
{{subparam|FullscreenType|fullscreentype|The type of fullscreen mode used.}}
 
{{subparam|FullscreenType|fullscreentype|The type of fullscreen mode used.}}
 
{{subparam|boolean|vsync|True if the graphics framerate is synchronized with the monitor's refresh rate, false otherwise.}}
 
{{subparam|boolean|vsync|True if the graphics framerate is synchronized with the monitor's refresh rate, false otherwise.}}
{{subparam|number|fsaa|The number of antialiasing samples used (0 if FSAA is disabled.)}}
+
{{subparam|number|msaa|The number of antialiasing samples used (0 if MSAA is disabled).}}
 
{{subparam|boolean|resizable|True if the window is resizable in windowed mode, false otherwise.}}
 
{{subparam|boolean|resizable|True if the window is resizable in windowed mode, false otherwise.}}
 
{{subparam|boolean|borderless|True if the window is borderless in windowed mode, false otherwise.}}
 
{{subparam|boolean|borderless|True if the window is borderless in windowed mode, false otherwise.}}
Line 23: Line 23:
 
{{subparam|number|minwidth|The minimum width of the window, if it's resizable.}}
 
{{subparam|number|minwidth|The minimum width of the window, if it's resizable.}}
 
{{subparam|number|minheight|The minimum height of the window, if it's resizable.}}
 
{{subparam|number|minheight|The minimum height of the window, if it's resizable.}}
{{subparam|boolean|highdpi|True if [[love.window.getPixelScale|high-dpi mode]] is allowed on Retina displays in OS X. Does nothing on non-Retina displays. Added in [[0.9.1]].}}
+
{{New feature|0.9.1|
{{subparam|boolean|srgb|True if sRGB gamma correction is applied when drawing to the screen. Added in [[0.9.1]].}}
+
{{subparam|boolean|highdpi|True if [[love.window.getPixelScale|high-dpi mode]] is allowed on Retina displays in OS X. Does nothing on non-Retina displays.}} }}
 +
{{New feature|0.9.2|
 +
{{subparam|number|refreshrate|The refresh rate of the screen's current display mode, in Hz. May be 0 if the value can't be determined.}}
 +
{{subparam|number|x|The x-coordinate of the window's position in its current display.}}
 +
{{subparam|number|y|The y-coordinate of the window's position in its current display.}} }}
 +
{{Removed new feature|0.9.1|0.10.0|
 +
{{subparam|boolean|srgb|Removed in [[0.10.0]] (use [[love.graphics.isGammaCorrect]] instead). True if sRGB gamma correction is applied when drawing to the screen.}} }}
 +
 
 
== See Also ==
 
== See Also ==
 
* [[parent::love.window]]
 
* [[parent::love.window]]

Latest revision as of 14:43, 28 December 2018

Available since LÖVE 0.9.0
Moved from love.graphics.getMode.

Gets the display mode and properties of the window.

Function

Synopsis

width, height, flags = love.window.getMode( )

Arguments

None.

Returns

number width
Window width.
number height
Window height.
table flags
Table with the window properties:
boolean fullscreen
Fullscreen (true), or windowed (false).
FullscreenType fullscreentype
The type of fullscreen mode used.
boolean vsync
True if the graphics framerate is synchronized with the monitor's refresh rate, false otherwise.
number msaa
The number of antialiasing samples used (0 if MSAA is disabled).
boolean resizable
True if the window is resizable in windowed mode, false otherwise.
boolean borderless
True if the window is borderless in windowed mode, false otherwise.
boolean centered
True if the window is centered in windowed mode, false otherwise.
number display
The index of the display the window is currently in, if multiple monitors are available.
number minwidth
The minimum width of the window, if it's resizable.
number minheight
The minimum height of the window, if it's resizable.
Available since LÖVE 0.9.1
boolean highdpi
True if high-dpi mode is allowed on Retina displays in OS X. Does nothing on non-Retina displays.


Available since LÖVE 0.9.2
number refreshrate
The refresh rate of the screen's current display mode, in Hz. May be 0 if the value can't be determined.
number x
The x-coordinate of the window's position in its current display.
number y
The y-coordinate of the window's position in its current display.


Available since LÖVE 0.9.1 and removed in LÖVE 0.10.0
boolean srgb
Removed in 0.10.0 (use love.graphics.isGammaCorrect instead). True if sRGB gamma correction is applied when drawing to the screen.


See Also

Other Languages