#plugins.core.tangent.manager.mode

Represents a Tangent Mode


#API Overview

Functions - API calls offered directly by the extension

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

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


#API Documentation

#Functions

Signatureplugins.core.tangent.manager.mode.is(thing) -> boolean
TypeFunction
DescriptionChecks to see if thing is a mode or not.
Parameters
  • thing - The item to check
Returns
  • true if is a mode otherwise false
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/mode.lua line 32

#Constructors

Signatureplugins.core.tangent.manager.mode(id, name)
TypeConstructor
DescriptionCreates a new Mode instance.
Parameters
  • id - The ID number of the mode.
  • name - The name of the mode.
Returns
  • *
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/mode.lua line 16

#Methods

Signatureplugins.core.tangent.manager.mode:activate() -> nil
TypeMethod
DescriptionExecutes the activate function, if present.
Parameters
  • None
Returns
  • nil
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/mode.lua line 69

Signatureplugins.core.tangent.manager.mode:onActivate(activateFn) -> self
TypeMethod
DescriptionSets the function that will be called when the Tangent sends a 'mode change' request.
Parameters
  • activateFn - The function to call when the Tangent requests the mode change.
Returns
  • The parameter instance.
Notes
  • This function should have this signature:
  • lua</li><li>function() -> nil</li><li>
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/mode.lua line 45

Signatureplugins.core.tangent.manager.mode:onDeactivate(deactivateFn) -> self
TypeMethod
DescriptionSets the function that will be called when the Tangent sends a 'mode change' request and switche to a different mode.
Parameters
  • deactivateFn - The function to call when the Tangent requests the mode change.
Returns
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/mode.lua line 82

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