Difference between revisions of "Application:getDeviceSafeArea"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2017.11.3<br/> === Description === <br /> Some screens have non rectangular shapes, in which case it is useful to know the bounds of t...") |
m (Text replacement - "</source" to "</syntaxhighlight") |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
'''Available since:''' Gideros 2017.11.3<br/> | '''Available since:''' Gideros 2017.11.3<br/> | ||
+ | '''Class:''' [[Application]]<br/> | ||
+ | |||
=== Description === | === Description === | ||
− | + | Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use, either in physical coordinates or in logical coordinates. | |
− | Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use, | + | <syntaxhighlight lang="lua"> |
− | either in physical coordinates or in logical coordinates. | + | (number), (number), (number), (number) = application:getDeviceSafeArea(logical) |
− | < | + | </syntaxhighlight> |
− | + | ||
− | (number) (number) (number) (number) | + | === Parameters === |
− | </ | + | '''logical''': (boolean) returns the margin in logical scale if set to true '''optional''' |
− | '''logical | + | |
− | '''Returns''' (number) | + | === Return values === |
− | '''Returns''' (number) | + | '''Returns''' (number) minimum x<br/> |
− | '''Returns''' (number) | + | '''Returns''' (number) minimum y<br/> |
− | '''Returns''' (number) | + | '''Returns''' (number) maximum x<br/> |
+ | '''Returns''' (number) maximum y<br/> | ||
+ | |||
+ | {{Application}} |
Latest revision as of 17:18, 12 July 2023
Available since: Gideros 2017.11.3
Class: Application
Description
Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use, either in physical coordinates or in logical coordinates.
(number), (number), (number), (number) = application:getDeviceSafeArea(logical)
Parameters
logical: (boolean) returns the margin in logical scale if set to true optional
Return values
Returns (number) minimum x
Returns (number) minimum y
Returns (number) maximum x
Returns (number) maximum y
- Application:applyStyles
- Application:canOpenUrl
- Application:checkPermission
- Application:configureFrustum
- Application:enableDrawInfo
- Application:enableOnDemandDraw
- Application:exit
- Application:get
- Application:getApiVersion
- Application:getAppId
- Application:getBackgroundColor
- Application:getClipboard
- Application:getContentHeight
- Application:getContentWidth
- Application:getDeviceHeight
- Application:getDeviceInfo
- Application:getDeviceName
- Application:getDeviceOrientation
- Application:getDeviceSafeArea
- Application:getDeviceWidth
- Application:getFps
- Application:getKeyboardModifiers
- Application:getLanguage
- Application:getLocale
- Application:getLogicalBounds
- Application:getLogicalHeight
- Application:getLogicalScaleX
- Application:getLogicalScaleY
- Application:getLogicalTranslateX
- Application:getLogicalTranslateY
- Application:getLogicalWidth
- Application:getNativePath
- Application:getOrientation
- Application:getProjectProperties
- Application:getScaleMode
- Application:getScreenDensity
- Application:getTextureMemoryUsage
- Application:isPlayerMode
- Application:openUrl
- Application:requestPermissions
- Application:set
- Application:setBackgroundColor
- Application:setClipboard
- Application:setEventMerging
- Application:setFps
- Application:setFullScreen
- Application:setKeepAwake
- Application:setKeyboardVisibility
- Application:setLogicalDimensions
- Application:setOrientation
- Application:setScaleMode
- Application:setTextInput
- Application:setWindowSize
- Application:vibrate