Difference between revisions of "love.window.getMode"

(Undo revision 12606 by Bangseongbeom (talk))
(Updated flags table for 0.9.x.)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function|text=Moved from [[love.graphics.getMode]]}}
 
{{newin|[[0.9.0]]|090|type=function|text=Moved from [[love.graphics.getMode]]}}
Returns the current display mode.
+
Gets the display mode and properties of the window.
  
 
== Function ==
 
== Function ==
Line 10: Line 10:
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|number|width|Display width.}}
+
{{param|number|width|Window width.}}
{{param|number|height|Display height.}}
+
{{param|number|height|Window height.}}
 
{{param|table|flags|The flags table with the options:}}
 
{{param|table|flags|The flags table with the options:}}
{{subparam|boolean|fullscreen (false)|Fullscreen (true), or windowed (false).}}
+
{{subparam|boolean|fullscreen|Fullscreen (true), or windowed (false).}}
{{subparam|boolean|vsync (true)|True if LÖVE should wait for vsync, false otherwise.}}
+
{{subparam|FullscreenType|fullscreentype|The type of fullscreen mode used.}}
{{subparam|number|fsaa (0)|The number of antialiasing samples.}}
+
{{subparam|boolean|vsync|True if the graphics framerate is synchronized with the monitor's refresh rate, false otherwise.}}
{{subparam|boolean|resizable (false)|True if the window should be resizable in windowed mode, false otherwise.}}
+
{{subparam|number|fsaa|The number of antialiasing samples used (0 if FSAA is disabled.)}}
{{subparam|boolean|borderless (false)|True if the window should be borderless in windowed mode, false otherwise.}}
+
{{subparam|boolean|resizable|True if the window is resizable in windowed mode, false otherwise.}}
{{subparam|boolean|centered (true)|True if the window should be centered in windowed mode, false otherwise.}}
+
{{subparam|boolean|borderless|True if the window is borderless in windowed mode, false otherwise.}}
 +
{{subparam|boolean|centered|True if the window is centered in windowed mode, false otherwise.}}
 +
{{subparam|number|display|The index of the display the window is currently in, if multiple monitors are available.}}
 +
{{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|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]].}}
 +
{{subparam|boolean|srgb|True if sRGB gamma correction is applied when drawing to the screen. Added in [[0.9.1]].}}
 
== See Also ==
 
== See Also ==
 
* [[parent::love.window]]
 
* [[parent::love.window]]
 
* [[love.window.setMode]]
 
* [[love.window.setMode]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Returns the current display mode.}}
+
{{#set:Description=Gets the display mode and properties of the window.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.window.getMode}}
 
{{i18n|love.window.getMode}}

Revision as of 00:50, 21 June 2014

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
The flags table with the options:
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 fsaa
The number of antialiasing samples used (0 if FSAA 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.
boolean highdpi
True if high-dpi mode is allowed on Retina displays in OS X. Does nothing on non-Retina displays. Added in 0.9.1.
boolean srgb
True if sRGB gamma correction is applied when drawing to the screen. Added in 0.9.1.

See Also

Other Languages