JsonGui

Associated namespace: sm.jsonGui

Values:

Functions:

Operations:

OperationReturn typeDescription
JsonGui == JsonGuibooleanChecks if two instances of JsonGui refer to the same JsonGui.

id integer

Get:

Returns the id of a gui.


clearOnCloseCallback(gui)

Clears the close callback so it will not be called when the gui is closed

Parameters:

TypeNameDescription
JsonGuiguiThe gui.

close(gui)

Close a JsonGui

Parameters:

TypeNameDescription
JsonGuiguiThe gui.

getWidget(gui, widgetName)

Returns a JsonWidget. Nil if no widget was found with the name

Parameters:

TypeNameDescription
JsonGuiguiThe gui.
stringwidgetNameThe name of the widget.

Returns:

TypeDescription
JsonWidgetwidget The found widget in the JsonGui.

getWidgetAbsolutePosition(gui, widgetName)

Get the absolute position of a named widget in 720 coords

Parameters:

TypeNameDescription
JsonGuiguiThe gui.
stringwidgetNameThe name of the widget.

Returns:

TypeDescription
number, numberLeft, Top

isActive(gui)

Check if a JsonGui is active

Parameters:

TypeNameDescription
JsonGuiguiThe gui.

Returns:

TypeDescription
booleanIs the gui active?

isHidden(gui)

Gets the visibility of the gui.

Parameters:

TypeNameDescription
JsonGuiguiThe gui.

Returns:

TypeDescription
booleanhidden True if the gui is hidden.

render(gui, DOM, forceProperties?)

Renders the DOM

Parameters:

TypeNameDescription
JsonGuiguiThe gui.
tableDOMA table representing the gui elements to show
booleanforceProperties?Force update widget properties (optional). (Defaults to false)

setHidden(gui, hidden)

Sets desired visibility of the gui.

Parameters:

TypeNameDescription
JsonGuiguiThe gui.
booleanhiddenTrue if the gui should be hidden.