Drag[en]gine Script Module DragonScript 1.32.1
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.

◆ collectButtonBinding()

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

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

Version
1.10

◆ collectDevices()

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

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

Version
1.10

◆ 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)

◆ findDefaultDevices()

void Dragengine.Commands.BindingManager.findDefaultDevices ( )
protected

Find default devices for quick access.

Version
1.28

◆ getButtonBindingAt()

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

Button binding at index.

◆ getButtonBindingCount()

int Dragengine.Commands.BindingManager.getButtonBindingCount ( )

Number of button bindings.

◆ getVRHMD()

InputDevice Dragengine.Commands.BindingManager.getVRHMD ( )

Default VR HMD device or null.

Version
1.28

◆ getVRLeftHand()

InputDevice Dragengine.Commands.BindingManager.getVRLeftHand ( )

Default VR Left Hand device or null.

Version
1.28

◆ getVRRightHand()

InputDevice Dragengine.Commands.BindingManager.getVRRightHand ( )

Default VR Right Hand device or null.

Version
1.28

◆ new() [1/2]

BindingManager Dragengine.Commands.BindingManager.new ( )

Create binding manager.

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

◆ removeListener()

void Dragengine.Commands.BindingManager.removeListener ( BindingManagerListener  listener)

Remove listener.

Version
1.6

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

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

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

Member Data Documentation

◆ pAxisBindings

Array Dragengine.Commands.BindingManager.pAxisBindings

◆ pMouse

InputDevice Dragengine.Commands.BindingManager.pMouse

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