Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
77 lines (63 loc) · 6.06 KB

plugins.core.tangent.manager.action.md

File metadata and controls

77 lines (63 loc) · 6.06 KB

docs » 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

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.

Fields

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

Methods

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