openspace.action
Functions overview
Name |
Documentation |
---|---|
Returns information about the action as a table with the keys ‘Identifier’, ‘Command’, ‘Name’, ‘Documentation’, ‘GuiPath’, and ‘Synchronization’ |
|
Returns all registered actions in the system as a table of tables each containing the keys ‘Identifier’, ‘Command’, ‘Name’, ‘Documentation’, ‘GuiPath’, and ‘Synchronization’ |
|
Checks if the passed identifier corresponds to an action |
|
Registers a new action |
|
Removes an existing action from the list of possible actions |
|
Triggers the action given by the specified identifier |
Functions
action
Returns information about the action as a table with the keys ‘Identifier’, ‘Command’, ‘Name’, ‘Documentation’, ‘GuiPath’, and ‘Synchronization’.
identifier
String
Return type: Table
openspace.action.action(identifier)
actions
Returns all registered actions in the system as a table of tables each containing the keys ‘Identifier’, ‘Command’, ‘Name’, ‘Documentation’, ‘GuiPath’, and ‘Synchronization’.
Return type: Table[]
openspace.action.actions()
hasAction
Checks if the passed identifier corresponds to an action.
identifier
String
Return type: Boolean
openspace.action.hasAction(identifier)
registerAction
Registers a new action. The first argument is the identifier which cannot have been used to register a previous action before, the second argument is the Lua command that is to be executed, and the optional third argument is the name used in a user-interface to refer to this action. The fourth is a human readable description of the command for documentation purposes. The fifth is the GUI path and the last parameter determines whether the action should be executed locally (= false) or remotely (= true, the default).
action
Action
Return type: void
openspace.action.registerAction(action)
removeAction
Removes an existing action from the list of possible actions. The action is identifies either by the passed name, or if it is a table, the value behind the ‘Identifier’ key is extract and used instead.
action
String | Table
Return type: void
openspace.action.removeAction(action)
triggerAction
Triggers the action given by the specified identifier.
id
String
arg
Table?
- Default value:ghoul::Dictionary()
Return type: void
openspace.action.triggerAction(id, arg)