Difference between revisions of "LGUI2:LS1:lgui2"
Jump to navigation
Jump to search
(Created page with "{{ObjectType-Vitals|lgui2|LavishGUI 2|none|LavishGUI 2.0|none|no|}} The lgui2 object type is the main LavishScript interface to LavishGUI 2 == Members == * ... '...") |
|||
Line 13: | Line 13: | ||
* '''PushSkin['''skin name''']''': Pushes a [[LGUI2:Skin|Skin]] by name onto the Skin stack | * '''PushSkin['''skin name''']''': Pushes a [[LGUI2:Skin|Skin]] by name onto the Skin stack | ||
* '''PopSkin['''skin name''']''': Pops a [[LGUI2:Skin|Skin]] by name off of the Skin stack, if it is the top of the stack | * '''PopSkin['''skin name''']''': Pops a [[LGUI2:Skin|Skin]] by name off of the Skin stack, if it is the top of the stack | ||
+ | |||
+ | == Examples == | ||
+ | ; Load a [[LGUI2:Skin|Skin]] file | ||
+ | LGUI2:LoadSkinFile["testskin.json"] | ||
+ | ; Push a [[LGUI2:Skin|Skin]] called "test skin" on to the Skin stack | ||
+ | LGUI2:PushSkin["test skin"] | ||
+ | ; Load an [[LGUI2:Element|Element]] file | ||
+ | LGUI2:LoadFile["testui.json"] | ||
+ | |||
[[Category:LavishGUI 2]] | [[Category:LavishGUI 2]] | ||
[[Category:LavishGUI 2 LavishScript API]] | [[Category:LavishGUI 2 LavishScript API]] |
Revision as of 13:58, 27 June 2018
lgui2 | |
Defined By | LavishGUI 2 |
Inherits | none |
Reduces To | LavishGUI 2.0 |
Variable Object Type | none |
Uses Sub-Types | no |
C/C++ Type |
The lgui2 object type is the main LavishScript interface to LavishGUI 2
Members
- ... LoadFile[filename]: Loads an Element file into the base LavishGUI 2 layer, returning an lgui2element-derived object type depending on the LavishGUI 2 element type. A JSON Object is expected in the file.
Methods
- Clear: Clears the base LavishGUI 2 layer
- LoadBindingsFile[filename]: Loads an Input Bindings file into the base LavishGUI 2 layer. A JSON Array is expected in the file.
- LoadFile[filename]: Loads an Element file into the base LavishGUI 2 layer. A JSON Object is expected in the file.
- LoadSkinFile[filename]: Loads a Skin file into the base LavishGUI 2 layer. A JSON Object is expected in the file.
- PushSkin[skin name]: Pushes a Skin by name onto the Skin stack
- PopSkin[skin name]: Pops a Skin by name off of the Skin stack, if it is the top of the stack
Examples
- Load a Skin file
LGUI2:LoadSkinFile["testskin.json"]
- Push a Skin called "test skin" on to the Skin stack
LGUI2:PushSkin["test skin"]
- Load an Element file
LGUI2:LoadFile["testui.json"]