Drag[en]gine Script Module DragonScript  1.23
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. More...
 
Array collectButtonBinding (Block ablock)
 Collect button binding matching block with parameter Binding as Array of Binding. More...
 
Array collectDevices (Block ablock)
 Collect devices with block with parameter InputDevice as Array of InputDevice. More...
 
Binding findButtonBinding (InputEventSource source, int device, int button)
 Find button binding matching device and source. More...
 
Binding findButtonBinding (int device, int button)
 Find button binding matching device and source. More...
 
Binding getButtonBindingAt (int index)
 Button binding at index. More...
 
int getButtonBindingCount ()
 Number of button bindings. More...
 
BindingManager new ()
 Create binding manager. More...
 
BindingManager new (BindingManager bindingManager)
 Create copy of binding manager. More...
 
void removeBindingsWithCommand (Command command)
 Remove all bindings with command. More...
 
void updateAllBindingIndices ()
 Update all binding indices. More...
 
void updateAxisBindingIndices (Binding binding)
 Update axis binding indices. More...
 
void updateButtonBindingIndices (Binding binding)
 Update button binding indices. More...
 

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)

◆ getButtonBindingAt()

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

Button binding at index.

◆ getButtonBindingCount()

int Dragengine.Commands.BindingManager.getButtonBindingCount ( )

Number of button bindings.

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

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


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