Skip to content

Widget

Functions

Function Name Usage Description Notes
GetProperties Properties component:GetProperties() Alternative to properties, this gets the bag of values produced from the property editor for this widget on this Entity. The properties are defined by the properties element in the html
Show component:Show() Makes the widget visible (Deprecated: Prefer widget.visible = true) Deprecated
Hide component:Hide() Makes the widget invisible (Deprecated: Prefer widget.visible = false) Deprecated
CallFunction component:CallFunction(string function, ... args) Calls a Javascript function on this widget with the specified name and arguments The function needs to be registered using engine.on before it can be called from Lua (See the default widget html template for an example)

Parameters

Parameter Name Usage Description Notes
properties Properties properties This gets the bag of values produced from the property editor for this widget on this Entity. The properties are defined by the properties element in the html
js WidgetBindings js Accessor for JavaScript bindings and function calls
visible bool visible Sets or gets the visibility of this widget
requiresCursor bool requiresCursor Sets or gets if this widget is interactive and requires a cursor
order number order Sets or gets the display order of this widget compared to other widgets

Overrides

Override Name Usage Description Notes
index object widget.var
new_index widget.var = object value