events
Last updated
Last updated
events.event_name:set(callback: function)
callback
function
Lua function to call
Sets the callback for the specified event. The registered function will be called every time the specified event occurs.
events.event_name:unset(callback: function)
callback
function
Lua function that was passed to the :set
function
Unsets the callback that was set via the :set
function from the specified event.
events.event_name:call(...)
...
Arguments to be passed by the callback
Fires the specified event.
events.event_name(callback: function[, state: boolean])
callback
function
Lua function to call
state
boolean
Optional. Callback state. If not specified then toggles the callback state for the specified function.
Sets / unsets the callback for the specified event.