Difference between revisions of "Application:set"
From GiderosMobile
(formatting) |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
'''Available since:''' Gideros 2015.7<br/> | '''Available since:''' Gideros 2015.7<br/> | ||
'''Class:''' [[Application]]<br/> | '''Class:''' [[Application]]<br/> | ||
Line 6: | Line 5: | ||
=== Description === | === Description === | ||
Sets the state of the desktop setting provided as string parameter. | Sets the state of the desktop setting provided as string parameter. | ||
− | |||
<source lang="lua"> | <source lang="lua"> | ||
− | application:set( | + | application:set(setting, value) |
</source> | </source> | ||
+ | === Parameters === | ||
+ | '''setting''': (string) the desktop setting<br/> | ||
+ | '''value''': (varies) the new setting value(s)<br/> | ||
+ | === List of available parameters and settings === | ||
To get a list of parameters that can be set use: | To get a list of parameters that can be set use: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="lua"> | <source lang="lua"> | ||
print(application:set("help")) | print(application:set("help")) | ||
Line 43: | Line 32: | ||
- temporaryDirectory(path) | - temporaryDirectory(path) | ||
]] | ]] | ||
+ | </source> | ||
− | + | To get help for individual settings use: | |
− | + | <source lang="lua"> | |
− | |||
− | |||
print(application:set("cursor","help")) | print(application:set("cursor","help")) | ||
--[[ | --[[ | ||
Line 73: | Line 61: | ||
- dragLink | - dragLink | ||
]] | ]] | ||
+ | </source> | ||
+ | === Examples === | ||
+ | <source lang="lua"> | ||
+ | application:set("windowPosition", 64, 64) | ||
+ | application:set("windowColor", 0, 0, 0) | ||
+ | application:set("windowTitle", "My lovely window title") | ||
application:set("cursor", "openHand") | application:set("cursor", "openHand") | ||
</source> | </source> | ||
{{Application}} | {{Application}} |
Revision as of 03:41, 26 August 2020
Available since: Gideros 2015.7
Class: Application
Description
Sets the state of the desktop setting provided as string parameter.
application:set(setting, value)
Parameters
setting: (string) the desktop setting
value: (varies) the new setting value(s)
List of available parameters and settings
To get a list of parameters that can be set use:
print(application:set("help"))
--[[
- windowPosition(x,y)
- windowSize(w,h)
- minimumSize(w,h)
- maximumSize(w,h)
- windowColor(r,g,b)
- windowTitle(text)
- windowModel(type//help)
- cursor(type//help)
- cursorPosition(x,y)
- clipboard(text)
- mkdir(path|dirName//help)
- documentDirectory(path)
- temporaryDirectory(path)
]]
To get help for individual settings use:
print(application:set("cursor","help"))
--[[
- arrow
- upArrow
- cross
- wait
- IBeam
- sizeVer
- sizeHor
- sizeBDiag
- sizeFDiag
- sizeAll
- blank
- splitV
- splitH
- pointingHand
- forbidden
- whatsThis
- busy
- openHand
- closedHand
- dragCopy
- dragMove
- dragLink
]]
Examples
application:set("windowPosition", 64, 64)
application:set("windowColor", 0, 0, 0)
application:set("windowTitle", "My lovely window title")
application:set("cursor", "openHand")
- 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