Drag[en]gine Script Module DragonScript
1.21
|
Input event. More...
Public Member Functions | |
Management | |
InputEventType | getType () |
Event type. More... | |
int | getDevice () |
Event device index. More... | |
int | getCode () |
Event code. More... | |
int | getState () |
Event state. More... | |
int | getKeyCode () |
Key code to identify important keys. More... | |
int | getKeyChar () |
Unicode Key character or 0. More... | |
int | getX () |
Relative mouse X movement or horizontal mouse wheel steps. More... | |
int | getY () |
Relative mouse Y movement or vertical mouse wheel steps. More... | |
float | getValue () |
Axis value. More... | |
int | getTime () |
Time the event occurred. More... | |
InputEventSource | getSource () |
Source of event. More... | |
Input event.
Event objects are generated by the input module and placed in the game engine event queue. The script module then reads those events and processes them.
This is a native class.
int Dragengine.InputEvent.getCode | ( | ) |
Event code.
Meaning depends on getType():
^ Event ^ Meaning ^ | --— | ----— | | InputEventType.keyPress | Key code matching InputEventKey. | | InputEventType.keyRelease | Key code matching InputEventKey. | | InputEventType.mousePress | Mouse button partially matching InputEventMouseButton. | | InputEventType.mouseRelease | Mouse button partially matching InputEventMouseButton. | | InputEventType.mouseMove | Index of X axis. | | InputEventType.mouseWheel | Index of axis. | | InputEventType.axisMove | Index of axis in device | | InputEventType.buttonPress | Index of button in device | | InputEventType.buttonRelease | Index of button in device | | InputEventType.deviceAttachedDetached | not used | | InputEventType.deviceParamsChanged | not used |
int Dragengine.InputEvent.getDevice | ( | ) |
Event device index.
int Dragengine.InputEvent.getKeyChar | ( | ) |
Unicode Key character or 0.
Only used for InputEventType.keyPress and InputEventType.keyRelease. If not 0 this is the unicode character of the printable character matching the pressed key combined with the currently pressed modifiers.
int Dragengine.InputEvent.getKeyCode | ( | ) |
Key code to identify important keys.
Used for InputEventType.keyPress and InputEventType.keyRelease only.
InputEventSource Dragengine.InputEvent.getSource | ( | ) |
Source of event.
int Dragengine.InputEvent.getState | ( | ) |
Event state.
Combination of flags from InputEventModifier.
int Dragengine.InputEvent.getTime | ( | ) |
Time the event occurred.
InputEventType Dragengine.InputEvent.getType | ( | ) |
Event type.
float Dragengine.InputEvent.getValue | ( | ) |
Axis value.
Used for InputEventType.axisMove only.
int Dragengine.InputEvent.getX | ( | ) |
Relative mouse X movement or horizontal mouse wheel steps.
Used for InputEventType.mouseMove and InputEventType.mouseWheel only.
int Dragengine.InputEvent.getY | ( | ) |
Relative mouse Y movement or vertical mouse wheel steps.
Used for InputEventType.mouseMove and InputEventType.mouseWheel only.