Component_ActionHandler Class
An action-handler component allows a UI game object to execute actions. An action can be a method-call of a component or of the scene which always takes two parameters: Sender and Params. For more info about UI actions, see help-file.
Item Index
Methods
Properties
Methods
dispose
()
Disposes the component.
executeAction
-
action
Executes the specified action if all assigned events and conditions are true.
Parameters:
-
action
ObjectThe action to execute.
executeActions
()
Executes the specified actions. A single action is only executed if all assigned events and conditions are true.
Returns:
If true there was at least one action executed. Otherwise false
onDataBundleRestore.
-
Object
-
gs.ObjectCodecContext
Called if this object instance is restored from a data-bundle. It can be used re-assign event-handler, anonymous functions, etc.
Parameters:
-
Object
Objectdata - The data-bundle
-
gs.ObjectCodecContext
Objectcontext - The codec-context.
setup
()
Initializes the action-handler.
setupActions
()
Sets up associated actions. Each action is validated and specific default values for the action-target and other options are set if not specified.
setupEventHandlers
()
Adds event-handler for mouse/touch events to update the component only if a user-action happened.
update
()
Updates the action-handler.
Properties
contains
Boolean
protected
Indicates if the mouse/touch pointer is inside the UI object's bounds.
initialized
Boolean
protected
waitCounter
Number
protected
Counter for delayed/timed actions.