Difference between revisions of "love.window.getSafeArea"
m |
m |
||
Line 13: | Line 13: | ||
{{param|number|y|Starting position of safe area (y-axis).}} | {{param|number|y|Starting position of safe area (y-axis).}} | ||
{{param|number|w|Width of safe area.}} | {{param|number|w|Width of safe area.}} | ||
− | {{param|number| | + | {{param|number|h|Height of safe area.}} |
== Notes == | == Notes == | ||
* Currently it only has a proper implementation on iOS and will return the window's full size otherwise. | * Currently it only has a proper implementation on iOS and will return the window's full size otherwise. | ||
− | * Values returned are in DPI- | + | * Values returned are in DPI-scaled units (the same coordinate system as most other window-related APIs), not in pixels. |
== See Also == | == See Also == |
Revision as of 16:25, 26 December 2018
Available since LÖVE 11.3 |
This function is not supported in earlier versions. |
Gets area inside the window which is known to be unobstructed by a system title bar, the iPhone X notch, etc. Useful for making sure UI elements can be seen by the user.
Function
Synopsis
x, y, w, h = love.window.getSafeArea( )
Arguments
None.
Returns
number x
- Starting position of safe area (x-axis).
number y
- Starting position of safe area (y-axis).
number w
- Width of safe area.
number h
- Height of safe area.
Notes
- Currently it only has a proper implementation on iOS and will return the window's full size otherwise.
- Values returned are in DPI-scaled units (the same coordinate system as most other window-related APIs), not in pixels.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info