# plugins.core.tangent.manager.action

Represents a Tangent Action


# API Overview

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

  • action

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

  • active
  • localActive

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

  • is
  • onPress
  • onRelease
  • xml

# API Documentation

# Constructors

# action

Signature plugins.core.tangent.manager.action(id[, name[, parent[, localActive]]]) -> action
Type Constructor
Description Creates 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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/action.lua line 17

# Fields

# active

Signature plugins.core.tangent.manager.action.active <cp.prop: boolean; read-only>
Type Field
Description Indicates if the action is active. It will only be active if
Notes None
Source src/plugins/core/tangent/manager/action.lua line 41

# localActive

Signature plugins.core.tangent.manager.action.localActive <cp.prop: boolean>
Type Field
Description Indicates if the action should ignore the parent's enabled state when determining if the action is active.
Notes None
Source src/plugins/core/tangent/manager/action.lua line 34

# Methods

# is

Signature plugins.core.tangent.manager.action.is() -> boolean
Type Method
Description Is an object an action?
Parameters
  • otherThing - Object to test.
Returns
  • true if the object is an action otherwise false.
Notes None
Examples None
Source src/plugins/core/tangent/manager/action.lua line 50

# onPress

Signature plugins.core.tangent.manager.action:onPress(pressFn) -> self
Type Method
Description Sets 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
Examples None
Source src/plugins/core/tangent/manager/action.lua line 63

# onRelease

Signature plugins.core.tangent.manager.action:onRelease(releaseFn) -> self
Type Method
Description Sets 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
Examples None
Source src/plugins/core/tangent/manager/action.lua line 100

# xml

Signature plugins.core.tangent.manager.action:xml() -> cp.web.xml
Type Method
Description Returns the xml configuration for the Action.
Parameters
  • None
Returns
  • The xml for the Action.
Notes None
Examples None
Source src/plugins/core/tangent/manager/action.lua line 137