Difference between revisions of "Application:set"

From GiderosMobile
(formatting)
Line 36: Line 36:
 
To get help for individual settings use:
 
To get help for individual settings use:
 
<source lang="lua">
 
<source lang="lua">
print(application:set("cursor","help"))
+
print(application:set("cursor","help")) -- eg: cursor
 
--[[
 
--[[
 +
Accepted value for cursor :
 
- arrow
 
- arrow
 
- upArrow
 
- upArrow
Line 60: Line 61:
 
- dragMove
 
- dragMove
 
- dragLink
 
- dragLink
 +
]]
 +
</source>
 +
 +
<source lang="lua">
 +
print(application:set("windowModel","help")) -- eg: window mode
 +
--[[
 +
Accepted value for windowModel :
 +
- reset
 +
- stayOnTop
 +
- stayOnBottom
 +
- frameless
 +
- noTitleBar
 +
- noButton
 +
- onlyMinimize
 +
- onlyMaximize
 +
- onlyClose
 +
- noMinimize
 +
- noMaximize
 +
- noClose
 +
- helpButton
 
]]
 
]]
 
</source>
 
</source>

Revision as of 04:07, 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")) -- eg: cursor
--[[
Accepted value for cursor :
- arrow
- upArrow
- cross
- wait
- IBeam
- sizeVer
- sizeHor
- sizeBDiag
- sizeFDiag
- sizeAll
- blank
- splitV
- splitH
- pointingHand
- forbidden
- whatsThis
- busy
- openHand
- closedHand
- dragCopy
- dragMove
- dragLink
]]
print(application:set("windowModel","help")) -- eg: window mode
--[[
Accepted value for windowModel :
- reset
- stayOnTop
- stayOnBottom
- frameless
- noTitleBar
- noButton
- onlyMinimize
- onlyMaximize
- onlyClose
- noMinimize
- noMaximize
- noClose
- helpButton
]]

Examples

application:set("windowPosition", 64, 64)
application:set("windowColor", 0, 0, 0)
application:set("windowTitle", "My lovely window title")
application:set("cursor", "openHand")