Drag[en]gine Script Module DragonScript  1.23
Dragengine.Gui.GamepadTriggerTracker Class Reference

Gamepad trigger tracker. More...

Inheritance diagram for Dragengine.Gui.GamepadTriggerTracker:

Classes

class  DefaultListener
 Default listener. More...
 
interface  Listener
 Listener. More...
 
class  TriggerState
 Trigger state. More...
 

Public Member Functions

void addListener (Listener listener)
 Add listener. More...
 
GamepadTriggerTracker new ()
 Create trigger tracker. More...
 
void reloadTriggers ()
 Reload triggers. More...
 
void removeListener (Listener listener)
 Remove listener. More...
 
void sendPullEvent (InputEventSource system, int device, int axis, int trigger)
 Send pull event to listeners. More...
 

Public Attributes

SafeArray pListeners
 
Array pTriggerStates
 

Protected Member Functions

void inputEventAxisMove (InputEvent event)
 Input event axis move. More...
 

Detailed Description

Gamepad trigger tracker.

Version
1.20

Helper class to track trigger being pulled and released for gamepads in InputProcessors. Upon creating an instance of GamepadTriggerTracker all gamepad triggers are located with their current value. Then forward events received by inputEvent() to GamepadTriggerTracker. Tracked pull and release events are then send to listener.

This class is designed for short use. For this reason this class does not track devices being attached or detached.

Member Function Documentation

◆ addListener()

void Dragengine.Gui.GamepadTriggerTracker.addListener ( Listener  listener)

Add listener.

◆ inputEventAxisMove()

void Dragengine.Gui.GamepadTriggerTracker.inputEventAxisMove ( InputEvent  event)
protected

Input event axis move.

◆ new()

GamepadTriggerTracker Dragengine.Gui.GamepadTriggerTracker.new ( )

Create trigger tracker.

◆ reloadTriggers()

void Dragengine.Gui.GamepadTriggerTracker.reloadTriggers ( )

Reload triggers.

◆ removeListener()

void Dragengine.Gui.GamepadTriggerTracker.removeListener ( Listener  listener)

Remove listener.

◆ sendPullEvent()

void Dragengine.Gui.GamepadTriggerTracker.sendPullEvent ( InputEventSource  system,
int  device,
int  axis,
int  trigger 
)

Send pull event to listeners.

Member Data Documentation

◆ pListeners

SafeArray Dragengine.Gui.GamepadTriggerTracker.pListeners

◆ pTriggerStates

Array Dragengine.Gui.GamepadTriggerTracker.pTriggerStates

The documentation for this class was generated from the following file: