summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-07-08 23:08:53 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-07-08 23:41:07 +0200
commit69c8b583e7b7c31e9316a24f185ca99f9452d91d (patch)
tree0dcc09765eb180e2325581eb8a9140359ff61250 /doc
parenta15de809429171e93556db6e9d7010a2b3d61f18 (diff)
classref: Add docs for InputEvent* and InputMap
Diffstat (limited to 'doc')
-rw-r--r--doc/base/classes.xml252
1 files changed, 241 insertions, 11 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index c77a3c7a45..cffbd68939 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -15946,8 +15946,10 @@
</class>
<class name="InputDefault" inherits="Input" category="Core">
<brief_description>
+ Default implementation of the [Input] class.
</brief_description>
<description>
+ Default implementation of the [Input] class, used internally by the editor and games for default input management.
</description>
<methods>
</methods>
@@ -15959,7 +15961,7 @@
Built-in input event data.
</brief_description>
<description>
- Built-in input event data. InputEvent is a built-in engine datatype, given that it's passed around and used so much. Depending on it's type, the members contained can be different, so read the documentation well!. Input events can also represent actions (editable from the project settings).
+ Built-in input event data. InputEvent is a built-in engine datatype, given that it's passed around and used so much. Depending on its type, the members contained can be different, so read the documentation well! Input events can also represent actions (editable from the project settings).
</description>
<methods>
<method name="is_action">
@@ -15977,6 +15979,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="is_action_released">
@@ -15985,20 +15988,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
- Return if this input event is an echo event (usually for key events).
+ Return if this input event is an echo event (only for events of type KEY, it will return false for other types).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
- Return if this input event is pressed (for key, mouse, joy button or screen press events).
+ Return if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="set_as_action">
@@ -16007,15 +16011,19 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name, regardless of its initial type, with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
</members>
<constants>
@@ -16038,17 +16046,22 @@
Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventAction" category="Built-In Types">
<brief_description>
+ Built-in input event type for actions.
</brief_description>
<description>
+ Input event type for actions that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16057,6 +16070,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action, i.e. always true for InputEventAction.
</description>
</method>
<method name="is_action_pressed">
@@ -16065,6 +16079,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
@@ -16073,18 +16088,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16093,42 +16111,57 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventJoystickButton" category="Built-In Types">
<brief_description>
+ Built-in input event type for joystick button events.
</brief_description>
<description>
+ Input event type for joystick button events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16137,6 +16170,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
@@ -16145,6 +16179,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
@@ -16153,18 +16188,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16173,48 +16211,66 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="button_index" type="int">
+ Joystick button identifier, one of the JOY_BUTTON_* constants in [@Global Scope].
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="pressed" type="bool">
+ Pressed state of the joystick button.
</member>
<member name="pressure" type="float">
+ Intensity of the button pressure, ranges from 0 to 1.0.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventJoystickMotion" category="Built-In Types">
<brief_description>
+ Built-in input event type for joystick motion/axis events.
</brief_description>
<description>
+ Input event type for joystick motion/axis events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16231,6 +16287,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
@@ -16239,18 +16296,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16259,46 +16319,63 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="axis" type="int">
+ Joystick axis identifier, one of the JOY_AXIS_* constants in [@Global Scope].
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="value" type="float">
+ Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventKey" category="Built-In Types">
<brief_description>
+ Built-in input event type for keyboard events.
</brief_description>
<description>
+ Input event type for keyboard events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16307,6 +16384,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
@@ -16315,6 +16393,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
@@ -16323,18 +16402,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event.
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16343,58 +16425,81 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="alt" type="bool">
+ State of the Alt modifier.
</member>
<member name="control" type="bool">
+ State of the Ctrl modifier.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="echo" type="bool">
+ Echo state of the key, i.e. whether it's a repeat event or not.
</member>
<member name="meta" type="bool">
+ State of the Meta modifier.
</member>
<member name="pressed" type="bool">
+ Pressed state of the key.
</member>
<member name="scancode" type="int">
+ Scancode of the key, one of the KEY_* constants in [@Global Scope].
</member>
<member name="shift" type="bool">
+ State of the Shift modifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="unicode" type="int">
+ Unicode identifier of the key (when relevant).
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventMouseButton" category="Built-In Types">
<brief_description>
+ Built-in input event type for mouse button events.
</brief_description>
<description>
+ Input event type for mouse button events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16403,6 +16508,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
@@ -16411,6 +16517,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
@@ -16419,18 +16526,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16439,70 +16549,99 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="alt" type="bool">
+ State of the Alt modifier.
</member>
<member name="button_index" type="int">
+ Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope].
</member>
<member name="button_mask" type="int">
+ Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
</member>
<member name="control" type="bool">
+ State of the Control modifier.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="doubleclick" type="bool">
+ Whether the event is a double-click.
</member>
<member name="global_pos" type="Vector2">
+ Global position of the mouse click.
</member>
<member name="global_x" type="int">
+ Global X coordinate of the mouse click.
</member>
<member name="global_y" type="int">
+ Global Y coordinate of the mouse click.
</member>
<member name="meta" type="bool">
+ State of the Meta modifier.
</member>
<member name="pos" type="Vector2">
+ Local position of the mouse click.
</member>
<member name="pressed" type="bool">
+ Pressed state of the mouse button.
</member>
<member name="shift" type="bool">
+ State of the Shift modifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="int">
+ Local X coordinate of the mouse click.
</member>
<member name="y" type="int">
+ Local Y coordinate of the mouse click.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventMouseMotion" category="Built-In Types">
<brief_description>
+ Built-in input event type for mouse motion events.
</brief_description>
<description>
+ Input event type for mouse motion events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16511,6 +16650,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
@@ -16519,6 +16659,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed. Not relevant for MOUSE_MOTION events, always false.
</description>
</method>
<method name="is_action_released">
@@ -16527,18 +16668,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed). Not relevant for MOUSE_MOTION events, can be true or false depending on whether [method is_action] is true.
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed. Not relevant for MOUSE_MOTION events, always false.
</description>
</method>
<method name="set_as_action">
@@ -16547,76 +16691,108 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the (irrelevant for this type) pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="alt" type="bool">
+ State of the Alt modifier.
</member>
<member name="button_mask" type="int">
+ Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
</member>
<member name="control" type="bool">
+ State of the Ctrl modifier.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="global_pos" type="Vector2">
+ Global position of the mouse pointer.
</member>
<member name="global_x" type="int">
+ Global X coordinate of the mouse pointer.
</member>
<member name="global_y" type="int">
+ Global Y coordinate of the mouse pointer.
</member>
<member name="meta" type="bool">
+ State of the Meta modifier.
</member>
<member name="pos" type="Vector2">
+ Local position of the mouse pointer.
</member>
<member name="relative_pos" type="Vector2">
+ Position of the mouse pointer relative to the previous mouse position.
</member>
<member name="relative_x" type="int">
+ X coordinate of the mouse pointer relative to the previous mouse position.
</member>
<member name="relative_y" type="int">
+ Y coordinate of the mouse pointer relative to the previous mouse position.
</member>
<member name="shift" type="bool">
+ State of the Shift modifier.
</member>
<member name="speed" type="Vector2">
+ Speed of the mouse pointer.
</member>
<member name="speed_x" type="float">
+ Speed of the mouse pointer on the X axis.
</member>
<member name="speed_y" type="float">
+ Speed of the mouse pointer on the Y axis.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="int">
+ Local X coordinate of the mouse pointer.
</member>
<member name="y" type="int">
+ Local Y coordinate of the mouse pointer.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventScreenDrag" category="Built-In Types">
<brief_description>
+ Built-in input event type for screen drag events.
</brief_description>
<description>
+ Input event type for screen drag events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16625,6 +16801,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
@@ -16633,6 +16810,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed. Not relevant for SCREEN_DRAG events, always false.
</description>
</method>
<method name="is_action_released">
@@ -16641,18 +16819,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed). Not relevant for SCREEN_DRAG events, can be true or false depending on whether [method is_action] is true.
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed. Not relevant for SCREEN_DRAG events, always false.
</description>
</method>
<method name="set_as_action">
@@ -16661,62 +16842,87 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the (irrelevant for this type) pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="index" type="int">
+ Drag event index in the case of a multi-drag event.
</member>
<member name="pos" type="Vector2">
+ Position of the drag event.
</member>
<member name="relative_pos" type="Vector2">
+ Position of the drag event relative to its start position.
</member>
<member name="relative_x" type="float">
+ X coordinate of the drag event relative to its start position.
</member>
<member name="relative_y" type="float">
+ Y coordinate of the drag event relative to its start position.
</member>
<member name="speed" type="Vector2">
+ Speed of the drag event.
</member>
<member name="speed_x" type="float">
+ Speed of the drag event on the X axis.
</member>
<member name="speed_y" type="float">
+ Speed of the drag event on the Y axis.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="float">
+ X coordinate of the drag event.
</member>
<member name="y" type="float">
+ Y coordinate of the drag event.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventScreenTouch" category="Built-In Types">
<brief_description>
+ Built-in input event type for touchscreen drag events.
</brief_description>
<description>
+ Input event type for touchscreen drag events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16725,6 +16931,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
@@ -16733,6 +16940,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
@@ -16741,18 +16949,21 @@
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16761,45 +16972,63 @@
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="index" type="int">
+ Touch event index in the case of a multi-touch event.
</member>
<member name="pos" type="Vector2">
+ Position of the touch event.
</member>
<member name="pressed" type="bool">
+ Pressed state of the touch event.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="float">
+ X coordinate of the touch event.
</member>
<member name="y" type="float">
+ Y coordinate of the touch event.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
@@ -16817,7 +17046,7 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Add an [InputEvent] to action. This [InputEvent] will trigger the action.
+ Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
@@ -16844,7 +17073,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Add an action to the [InputMap].
+ Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
</description>
</method>
<method name="erase_action">
@@ -16862,6 +17091,7 @@
<argument index="1" name="action" type="String">
</argument>
<description>
+ Return whether the given event is part of an existing action.
</description>
</method>
<method name="get_action_from_id" qualifiers="const">
@@ -16870,7 +17100,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the action from an id.
+ Return the action corresponding to the identifier.
</description>
</method>
<method name="get_action_id" qualifiers="const">
@@ -16879,7 +17109,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Return the id of an action.
+ Return the identifier of the given action.
</description>
</method>
<method name="get_action_list">
@@ -16888,14 +17118,14 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Return an [Array] of [InputEvent]s associated with an action.
+ Return an array of InputEvents associated with a given action.
</description>
</method>
<method name="get_actions">
<return type="Array">
</return>
<description>
- Return an [Array] of all actions in the [InputMap].
+ Return an array of all actions in the [InputMap].
</description>
</method>
<method name="has_action" qualifiers="const">
@@ -16904,12 +17134,12 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Whether this InputMap has an action with name "action".
+ Whether this InputMap has a registered action with the given name.
</description>
</method>
<method name="load_from_globals">
<description>
- Clears the [InputMap] and loads it from [Globals].
+ Clear the [InputMap] and load it anew from [Globals].
</description>
</method>
</methods>