JsonGui
Values:
Operations:
| Operation | Returns | Description |
|---|---|---|
JsonGui == JsonGui |
boolean | Checks if two instances of JsonGui refer to the same JsonGui. |
Functions
clearOnCloseCallback
jsonGui:clearOnCloseCallback( )
Clears the close callback so it will not be called when the gui is closed
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
close
jsonGui:close( )
Close a JsonGui
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
getWidget
jsonGui:getWidget( widgetName )
Returns a JsonWidget. Nil if no widget was found with the name
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
widgetName |
string | The name of the widget. |
Returns:
| Name | Type | Description |
|---|---|---|
widget |
JsonWidget | The found widget in the JsonGui. |
getWidgetAbsolutePosition
jsonGui:getWidgetAbsolutePosition( widgetName )
Get the absolute position of a named widget in 720 coords
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
widgetName |
string | The name of the widget. |
Returns:
| Type | Description |
|---|---|
| number number |
Left, Top |
isActive
jsonGui:isActive( )
Check if a JsonGui is active
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
Returns:
| Type | Description |
|---|---|
| boolean | Is the gui active? |
isHidden
jsonGui:isHidden( )
Gets the visibility of the gui.
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
Returns:
| Name | Type | Description |
|---|---|---|
hidden |
boolean | True if the gui is hidden. |
render
jsonGui:render( DOM, forceProperties )
Renders the DOM
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
DOM |
table | A table representing the gui elements to show |
forceProperties (optional) |
boolean | Force update widget properties (optional). (Defaults to false) |
setHidden
jsonGui:setHidden( hidden )
Sets desired visibility of the gui.
Parameters:
| Name | Type | Description |
|---|---|---|
gui |
JsonGui | The gui. |
hidden |
boolean | True if the gui should be hidden. |