|
Drag[en]gine Script Module DragonScript 1.32.1
|
Input event. More...
Public Member Functions | |
Management | |
| InputEventType | getType () |
| Event type. | |
| int | getDevice () |
| Event device index. | |
| int | getCode () |
| Event code. | |
| int | getState () |
| Event state. | |
| int | getKeyCode () |
| Key code to identify important keys. | |
| int | getKeyChar () |
| Unicode Key character or 0. | |
| int | getX () |
| Relative mouse X movement or horizontal mouse wheel steps. | |
| int | getY () |
| Relative mouse Y movement or vertical mouse wheel steps. | |
| float | getValue () |
| Axis value. | |
| int | getTime () |
| Time the event occurred. | |
| InputEventSource | getSource () |
| Source of event. | |
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 | | InputEventType.boneSkeletonChanged | 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.