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 int Command ID
- async bool 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 int Command ID
- async bool 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()