openspace.action

Functions overview

Name

Documentation

action

Returns information about the action as a table with the keys ‘Identifier’, ‘Command’, ‘Name’, ‘Documentation’, ‘GuiPath’, and ‘Synchronization’

actions

Returns all registered actions in the system as a table of tables each containing the keys ‘Identifier’, ‘Command’, ‘Name’, ‘Documentation’, ‘GuiPath’, and ‘Synchronization’

hasAction

Checks if the passed identifier corresponds to an action

registerAction

Registers a new action

removeAction

Removes an existing action from the list of possible actions

triggerAction

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’.

Parameters
  • identifier String

Return type: Table

Signature
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[]

Signature
openspace.action.actions()

hasAction

Checks if the passed identifier corresponds to an action.

Parameters
  • identifier String

Return type: Boolean

Signature
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).

Parameters
  • action Action

Return type: void

Signature
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.

Parameters
  • action String | Table

Return type: void

Signature
openspace.action.removeAction(action)

triggerAction

Triggers the action given by the specified identifier.

Parameters
  • id String

  • arg Table? - Default value: ghoul::Dictionary()

Return type: void

Signature
openspace.action.triggerAction(id, arg)