Module el.command
UI Commands.
Support library for working with Element UI commands.
Functions
| invoke (cmd, async) | Invoke a command. |
| closure (cmd, async) | Create a closure for a command. |
Functions
- invoke (cmd, async)
-
Invoke a command.
Parameters:
- cmd integer Command ID
- async boolean Invoke async or not (default false)
- closure (cmd, async)
-
Create a closure for a command.
Returns a function which invokes the command async or not. By default the command is not invoked async
Parameters:
- cmd integer Command ID
- async boolean Whether to invoke async or not
Returns:
-
function Function which invokes the command
Usage:
local show_about = command.closure (command.SHOW_ABOUT, true) show_about()