#plugins.core.tangent.manager.action

Represents a Tangent Action


#API Overview

Constructors - API calls which return an object, typically one that offers API methods

Fields - Variables which can only be accessed from an object returned by a constructor

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Constructors

Signatureplugins.core.tangent.manager.action(id[, name[, parent[, localActive]]]) -> action
TypeConstructor
DescriptionCreates a new Action instance.
Parameters
  • id - The ID number of the action.
  • name - The name of the action.
  • parent - The parent group. (optional)
  • localActive - If set to true, the parent's active state will be ignored when determining if this action is active. Defaults to false.
Returns
  • the new action.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 17

#Fields

Signatureplugins.core.tangent.manager.action.active <cp.prop: boolean; read-only>
TypeField
DescriptionIndicates if the action is active. It will only be active if
NotesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 41

Signatureplugins.core.tangent.manager.action.localActive <cp.prop: boolean>
TypeField
DescriptionIndicates if the action should ignore the parent's enabled state when determining if the action is active.
NotesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 34

#Methods

Signatureplugins.core.tangent.manager.action.is() -> boolean
TypeMethod
DescriptionIs an object an action?
Parameters
  • otherThing - Object to test.
Returns
  • true if the object is an action otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 50

Signatureplugins.core.tangent.manager.action:onPress(pressFn) -> self
TypeMethod
DescriptionSets the function that will be called when the Tangent sends a 'action on' request.
Parameters
  • pressFn - The function to call when the Tangent requests the action on.
Returns
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 63

Signatureplugins.core.tangent.manager.action:onRelease(releaseFn) -> self
TypeMethod
DescriptionSets the function that will be called when the Tangent sends a 'action off' request.
Parameters
  • releaseFn - The function to call when the Tangent requests the action off.
Returns
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 100

Signatureplugins.core.tangent.manager.action:xml() -> cp.web.xml
TypeMethod
DescriptionReturns the xml configuration for the Action.
Parameters
  • None
Returns
  • The xml for the Action.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/action.lua line 137