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