mirror of
https://github.com/godotengine/godot
synced 2024-07-05 16:03:36 +00:00
Updated tutorial_input_events (markdown)
parent
a0b98b59c3
commit
613e11e752
|
@ -28,7 +28,7 @@ Example of changing event type.
|
|||
```python
|
||||
# create event
|
||||
var ev = InputEvent.new()
|
||||
# set type
|
||||
# set type index
|
||||
ev.type=InputEvent.MOUSE_BUTTON
|
||||
# button_index is only available for the above type
|
||||
ev.button_index=BUTTON_LEFT
|
||||
|
@ -40,6 +40,15 @@ There are several types of InputEvent, described in the table below:
|
|||
|-------|------------|-------------|
|
||||
|[InputEvent](class_inputevent)|NONE|Empty Input Event|
|
||||
|[InputEventKey](class_inputeventkey)|KEY|Contains a scancode and unicode value, as well as modifiers|
|
||||
|[InputEventMouseButton](class_inputeventmousebutton)|MOUSE_BUTTON|Contains click information, such as button, modifiers, etc.|
|
||||
|[InputEventMouseMotion](class_inputeventmousemotion)|MOUSE_MOTION|Contains motion information, such as relative, absolute positions and speed.|
|
||||
|[InputEventJoystickMotion](class_inputeventjoystickmotion)|JOYSTICK_MOTION|Contains Joystick/Joypad analog axis information.|
|
||||
|[InputEventJoystickButton](class_inputeventjoystickbutton)|JOYSTICK_BUTTON|Contains Joystick/Joypad button information.|
|
||||
|[InputEventScreenTouch](class_inputeventscreentouch)|SCREEN_TOUCH|Contains multi-touch press/release information. (only available on mobile devices)|
|
||||
|[InputEventScreenDrag](class_inputeventscreendrag)|SCREEN_DRAG|Contains multi-touch drag information. (only available on mobile devices)|
|
||||
|[InputEventAction](class_inputeventaction)|SCREEN_ACTION|Contains a generic action. These events are often generated by the programmer as feedback. (more on this below)|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user