Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Commands.BindingManager Class Reference

Manage input bindings. More...

Inheritance diagram for Dragengine.Commands.BindingManager:

Public Member Functions

void addButtonBinding (Binding binding)
 Add button binding.
Array collectButtonBinding (Block ablock)
 Collect button binding matching block with parameter Binding as Array of Binding.
Array collectDevices (Block ablock)
 Collect devices with block with parameter InputDevice as Array of InputDevice.
Binding findButtonBinding (InputEventSource source, int device, int button)
 Find button binding matching device and source.
Binding findButtonBinding (int device, int button)
 Find button binding matching device and source.
Binding getButtonBindingAt (int index)
 Button binding at index.
int getButtonBindingCount ()
 Number of button bindings.
InputDevice getVRHMD ()
 Default VR HMD device or null.
InputDevice getVRLeftHand ()
 Default VR Left Hand device or null.
InputDevice getVRRightHand ()
 Default VR Right Hand device or null.
BindingManager new ()
 Create binding manager.
BindingManager new (BindingManager bindingManager)
 Create copy of binding manager.
void removeBindingsWithCommand (Command command)
 Remove all bindings with command.
void removeListener (BindingManagerListener listener)
 Remove listener.
void updateAllBindingIndices ()
 Update all binding indices.
void updateAxisBindingIndices (Binding binding)
 Update axis binding indices.
void updateButtonBindingIndices (Binding binding)
 Update button binding indices.

Public Attributes

Array pAxisBindings
InputDevice pMouse

Protected Member Functions

void findDefaultDevices ()
 Find default devices for quick access.

Detailed Description

Manage input bindings.

Bindings are identified by device and either axis modifier or button modifier. For quicker access the device, axis and button index are used. Upon receiving InputEventType.deviceAttached, InputEventType.deviceDetached or InputEventType.deviceParamsChanged the internal data structures have to be updated. Game scripts have to send received events to the binding manager using checkInputEvent(). This method knows what events are important avoiding the game scripts requiring to know.

After creating the binding manager has updated the internal data structures already.

Member Function Documentation

◆ addButtonBinding()

void Dragengine.Commands.BindingManager.addButtonBinding ( Binding binding)

Add button binding.

Referenced by removeListener().

◆ collectButtonBinding()

Array Dragengine.Commands.BindingManager.collectButtonBinding ( Block ablock)

Collect button binding matching block with parameter Binding as Array of Binding.

Version
1.10

Referenced by removeListener().

◆ collectDevices()

Array Dragengine.Commands.BindingManager.collectDevices ( Block ablock)

Collect devices with block with parameter InputDevice as Array of InputDevice.

Version
1.10

Referenced by removeListener().

◆ findButtonBinding() [1/2]

Binding Dragengine.Commands.BindingManager.findButtonBinding ( InputEventSource source,
int device,
int button )

Find button binding matching device and source.

Version
1.6

◆ findButtonBinding() [2/2]

Binding Dragengine.Commands.BindingManager.findButtonBinding ( int device,
int button )

Find button binding matching device and source.

Deprecated
Use findButtonBinding(InputEventSource,int,int)

Referenced by removeListener().

◆ findDefaultDevices()

void Dragengine.Commands.BindingManager.findDefaultDevices ( )
protected

Find default devices for quick access.

Version
1.28

References pAxisBindings.

Referenced by removeListener().

◆ getButtonBindingAt()

Binding Dragengine.Commands.BindingManager.getButtonBindingAt ( int index)

Button binding at index.

References pAxisBindings.

Referenced by removeListener().

◆ getButtonBindingCount()

int Dragengine.Commands.BindingManager.getButtonBindingCount ( )

Number of button bindings.

Referenced by removeListener().

◆ getVRHMD()

InputDevice Dragengine.Commands.BindingManager.getVRHMD ( )

Default VR HMD device or null.

Version
1.28

Referenced by removeListener().

◆ getVRLeftHand()

InputDevice Dragengine.Commands.BindingManager.getVRLeftHand ( )

Default VR Left Hand device or null.

Version
1.28

Referenced by removeListener().

◆ getVRRightHand()

InputDevice Dragengine.Commands.BindingManager.getVRRightHand ( )

Default VR Right Hand device or null.

Version
1.28

References pAxisBindings, and updateAxisBindingIndices().

Referenced by removeListener().

◆ new() [1/2]

BindingManager Dragengine.Commands.BindingManager.new ( )

Create binding manager.

References new(), and pAxisBindings.

Referenced by new().

◆ new() [2/2]

BindingManager Dragengine.Commands.BindingManager.new ( BindingManager bindingManager)

Create copy of binding manager.

◆ removeBindingsWithCommand()

void Dragengine.Commands.BindingManager.removeBindingsWithCommand ( Command command)

Remove all bindings with command.

Referenced by removeListener().

◆ removeListener()

◆ updateAllBindingIndices()

void Dragengine.Commands.BindingManager.updateAllBindingIndices ( )

Update all binding indices.

Call if you made changes to many bindings affecting device and source ids. You do not need to call this if you just added or removed bindings.

References pAxisBindings.

Referenced by removeListener().

◆ updateAxisBindingIndices()

void Dragengine.Commands.BindingManager.updateAxisBindingIndices ( Binding binding)

Update axis binding indices.

Call if you made changes to the binding affecting device and source id. You do not need to call this if you added or removed the binding.

Referenced by getVRRightHand(), and removeListener().

◆ updateButtonBindingIndices()

void Dragengine.Commands.BindingManager.updateButtonBindingIndices ( Binding binding)

Update button binding indices.

Call if you made changes to the binding affecting device and source id. You do not need to call this if you added or removed the binding.

References pAxisBindings.

Referenced by removeListener().

Member Data Documentation

◆ pAxisBindings

Array Dragengine.Commands.BindingManager.pAxisBindings

◆ pMouse

InputDevice Dragengine.Commands.BindingManager.pMouse

Referenced by removeListener().


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