Library Reference - Windower/packages GitHub Wiki
This section contains reference information about the custom Lua libraries available with Windower.
About Function Signatures
Function signatures in the Library Reference are specified with some additional information about parameter types and default values.
Example:
ui.buttonfunction signaturefunction ui.button(id : string, text : string, checked : boolean = false, enabled : boolean = true) : boolean
From this example, we can see that the function takes four parameters:
- id : a
string - text : a
string - checked : an optional
booleanvalue that defaults tofalse - enabled : an optional
booleanvalue that defaults totrue
We can also see that the function itself returns a single boolean value.
By removing all the additional parameter type information from the signature, we are left with valid Lua syntax.
For example, removing : string from the id parameter, and so on, gives us this:
Example:
ui.buttonfunction signature, with type information removedfunction ui.button(id, text, checked, enabled)
This function definition can be used to assign the return value to a variable in standard Lua:
Example:
ui.buttonLua usagelocal button_checked = ui.button(id, text, checked, enabled)