Drag[en]gine Script Module DragonScript  1.23
Dragengine.InputEvent Class Reference

Input event. More...

Inheritance diagram for Dragengine.InputEvent:

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

Detailed Description

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.

Member Function Documentation

◆ getCode()

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 |

◆ getDevice()

int Dragengine.InputEvent.getDevice ( )

Event device index.

◆ getKeyChar()

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.

◆ getKeyCode()

int Dragengine.InputEvent.getKeyCode ( )

Key code to identify important keys.

Used for InputEventType.keyPress and InputEventType.keyRelease only.

◆ getSource()

InputEventSource Dragengine.InputEvent.getSource ( )

Source of event.

Version
1.6

◆ getState()

int Dragengine.InputEvent.getState ( )

Event state.

Combination of flags from InputEventModifier.

◆ getTime()

int Dragengine.InputEvent.getTime ( )

Time the event occurred.

◆ getType()

InputEventType Dragengine.InputEvent.getType ( )

Event type.

◆ getValue()

float Dragengine.InputEvent.getValue ( )

Axis value.

Used for InputEventType.axisMove only.

◆ getX()

int Dragengine.InputEvent.getX ( )

Relative mouse X movement or horizontal mouse wheel steps.

Used for InputEventType.mouseMove and InputEventType.mouseWheel only.

◆ getY()

int Dragengine.InputEvent.getY ( )

Relative mouse Y movement or vertical mouse wheel steps.

Used for InputEventType.mouseMove and InputEventType.mouseWheel only.


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