summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJerome67000 <jerome.gully0@gmail.com>2017-10-16 00:07:13 +0200
committerJerome67000 <jerome.gully0@gmail.com>2017-10-21 10:04:43 +0200
commit0a89b0f76785fe0865894e5b1e37892e17ccd069 (patch)
treed790c60d358e4314291ef0992214ced3ec154a06 /doc
parent9876bad05c9a037b7dd4ff7f2c981d1b20278e72 (diff)
[DOCS] InputEvent*
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/InputEvent.xml20
-rw-r--r--doc/classes/InputEventAction.xml4
-rw-r--r--doc/classes/InputEventJoypadButton.xml10
-rw-r--r--doc/classes/InputEventJoypadMotion.xml8
-rw-r--r--doc/classes/InputEventKey.xml10
-rw-r--r--doc/classes/InputEventMouse.xml6
-rw-r--r--doc/classes/InputEventMouseButton.xml7
-rw-r--r--doc/classes/InputEventMouseMotion.xml6
-rw-r--r--doc/classes/InputEventScreenDrag.xml9
-rw-r--r--doc/classes/InputEventScreenTouch.xml9
-rw-r--r--doc/classes/InputEventWithModifiers.xml4
-rw-r--r--doc/classes/InputMap.xml24
12 files changed, 74 insertions, 43 deletions
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 392ee25ad6..c6abf2fee5 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -4,8 +4,10 @@
Generic input event
</brief_description>
<description>
+ Base class of all sort of input event. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -16,7 +18,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Returns true if this input event matches the event passed.
+ Returns [code]true[/code] if this event matches [code]event[event].
</description>
</method>
<method name="as_text" qualifiers="const">
@@ -30,14 +32,14 @@
<return type="int">
</return>
<description>
- Returns the id of the device that generated the event.
+ Returns the device's id that generated the event.
</description>
</method>
<method name="get_id" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the id of the event.
+ Returns the event's ID.
</description>
</method>
<method name="is_action" qualifiers="const">
@@ -46,7 +48,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Returns true if this input event matches a pre-defined action, no matter the type.
+ Returns [code]true[/code] if this input event matches a pre-defined action of any type.
</description>
</method>
<method name="is_action_pressed" qualifiers="const">
@@ -55,7 +57,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Returns true if 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.
+ Returns [code]true[/code] if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types [code]MOUSE_MOTION[/code], [code]SCREEN_DRAG[/code] or [code]NONE[/code].
</description>
</method>
<method name="is_action_released" qualifiers="const">
@@ -64,27 +66,28 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for the event types [code]MOUSE_MOTION[/code], [code]SCREEN_DRAG[/code] or [code]NONE[/code].
</description>
</method>
<method name="is_action_type" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if this input event's type is one of the [code]InputEvent[/code] constants.
</description>
</method>
<method name="is_echo" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types).
+ Returns [code]true[/code] if this input event is an echo event (only for events of type KEY).
</description>
</method>
<method name="is_pressed" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ Returns [code]true[/code] if this input event is pressed. Not relevant for the event types [code]MOUSE_MOTION[/code], [code]SCREEN_DRAG[/code] or [code]NONE[/code].
</description>
</method>
<method name="set_device">
@@ -124,6 +127,7 @@
</methods>
<members>
<member name="device" type="int" setter="set_device" getter="get_device">
+ The event's device ID.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index 2617ea4dfa..a2f4c9b9d3 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -4,8 +4,10 @@
Input event type for actions.
</brief_description>
<description>
+ Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu [code]Project > Project Settings > Input Map[/Code]. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html#actions
</tutorials>
<demos>
</demos>
@@ -35,8 +37,10 @@
</methods>
<members>
<member name="action" type="String" setter="set_action" getter="get_action">
+ The action's name. Actions are accessed via this [String].
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ If [code]true[/code] the action's state is pressed. If [code]false[/code] the action's state is released.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index 2784b06442..f13a1102b7 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Input event type for joypad button events.
+ Input event for gamepad buttons.
</brief_description>
<description>
+ Input event type for gamepad buttons. For joysticks see [InputEventJoypadMotion].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -49,13 +51,13 @@
</methods>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index">
- Joypad button identifier, one of the JOY_BUTTON_* constants in [@Global Scope].
+ Button identifier. One of the [code]JOY_BUTTON_*[/code] constants from [@global Scope].
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
- Pressed state of the joypad button.
+ If [code]true[/code] the button's state is pressed. If [code]false[/code] the button's state is released.
</member>
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure">
- Intensity of the button pressure, ranges from 0 to 1.0.
+ Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 8a26007fc1..9e7edfb822 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Input event type for joypad motion/axis events.
+ Input event type for gamepad joysticks and other motions. For buttons see [InputEventJoypadMotion].
</brief_description>
<description>
+ Stores information about joystick motions. One [code]InputEventJoypadMotion[/code] represents one axis at a time.
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -41,10 +43,10 @@
</methods>
<members>
<member name="axis" type="int" setter="set_axis" getter="get_axis">
- Joypad axis identifier, one of the JOY_AXIS_* constants in [@Global Scope].
+ Axis identifier. Use one of the [code]JOY_AXIS_*[/code] constants in [@global Scope].
</member>
<member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value">
- Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position.
+ Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index 151e19d25d..9565584a4f 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -4,8 +4,10 @@
Input event type for keyboard events.
</brief_description>
<description>
+ Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events.
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -63,16 +65,16 @@
</methods>
<members>
<member name="echo" type="bool" setter="set_echo" getter="is_echo">
- Echo state of the key, i.e. whether it's a repeat event or not.
+ If [code]true[/code] the key was already pressed before this event. It means the user is holding the key down.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
- Pressed state of the key.
+ If [code]true[/code] the key's state is pressed. If [code]false[/code] the key's state is released.
</member>
<member name="scancode" type="int" setter="set_scancode" getter="get_scancode">
- Scancode of the key, one of the KEY_* constants in [@Global Scope].
+ Key scancode, one of the [code]KEY_*[/code] constants in [@global Scope].
</member>
<member name="unicode" type="int" setter="set_unicode" getter="get_unicode">
- Unicode identifier of the key (when relevant).
+ Key unicode identifier when relevant.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index 57f0acbf30..38eec74ffa 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -4,8 +4,10 @@
Base input event type for mouse events.
</brief_description>
<description>
+ Stores general mouse events informations.
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -58,10 +60,10 @@
Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
</member>
<member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position">
- Global position of the mouse click.
+ Mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position">
- Local position of the mouse click.
+ Mouse local position relative to the [Viewport]. If used in [method Control._gui_input] the position is relative to the current [Control] wich is under the mouse.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index 63e31eb61c..afc0c331c8 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -4,8 +4,10 @@
Input event type for mouse button events.
</brief_description>
<description>
+ Contains mouse click informations. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -66,12 +68,13 @@
Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope].
</member>
<member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick">
- Whether the event is a double-click.
+ If [code]true[/code] the mouse button's state is a double-click. If [code]false[/code] the mouse button's state is released.
</member>
<member name="factor" type="float" setter="set_factor" getter="get_factor">
+ TO TALK in PR, reduz said : i think it's used for apple touch but i don't remember what it does
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
- Pressed state of the mouse button.
+ If [code]true[/code] the mouse button's state is pressed. If [code]false[/code] the mouse button's state is released.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 59fe8d2e58..5be82e1ffa 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -4,8 +4,10 @@
Input event type for mouse motion events.
</brief_description>
<description>
+ Contains mouse motion informations. Supports relative, absolute positions and speed. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -41,10 +43,10 @@
</methods>
<members>
<member name="relative" type="Vector2" setter="set_relative" getter="get_relative">
- Position of the mouse pointer relative to the previous mouse position.
+ Mouse position relative to the previous position (position at the last frame).
</member>
<member name="speed" type="Vector2" setter="set_speed" getter="get_speed">
- Speed of the mouse pointer.
+ Mouse speed.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index 0b0ecc17bc..0c92ad5f70 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -2,10 +2,13 @@
<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Input event type for screen drag events.
+ (only available on mobile devices)
</brief_description>
<description>
+ Contains screen drag informations. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -72,13 +75,13 @@
Drag event index in the case of a multi-drag event.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position">
- Position of the drag event.
+ Drag position.
</member>
<member name="relative" type="Vector2" setter="set_relative" getter="get_relative">
- Position of the drag event relative to its start position.
+ Drag position relative to its start position.
</member>
<member name="speed" type="Vector2" setter="set_speed" getter="get_speed">
- Speed of the drag event.
+ Drag speed.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index 48c5626f14..01ba9f1285 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -2,10 +2,13 @@
<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Input event type for screen touch events.
+ (only available on mobile devices)
</brief_description>
<description>
+ Stores multi-touch press/release information. Supports touch press, touch release and [member index] for multi-touch count and order.
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
@@ -49,13 +52,13 @@
</methods>
<members>
<member name="index" type="int" setter="set_index" getter="get_index">
- Touch event index in the case of a multi-touch event.
+ Touch index in the case of a multi-touch event. One index = one finger.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position">
- Position of the touch event.
+ Touch position.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
- Pressed state of the touch event.
+ If [code]true[/code] the touch's state is pressed. If [code]false[/code] the touch's state is released.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 7bbdf0a441..46107a4ab8 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Base class for input events with modifiers.
+ Base class for keys events with modifiers.
</brief_description>
<description>
+ Contains keys events informations with modifiers support like [code]SHIFT[/code] or [code]ALT[/code]. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index bf72ba05e7..333edf02b5 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InputMap" inherits="Object" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Singleton that manages actions.
+ Singleton that manages [InputEventAction].
</brief_description>
<description>
+ Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project > Project Settings > Input Map[/Code] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
</description>
<tutorials>
+ http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html#inputmap
</tutorials>
<demos>
</demos>
@@ -18,7 +20,7 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
+ Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
@@ -29,7 +31,7 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Remove an [InputEvent] from an action.
+ Removes an [InputEvent] from an action.
</description>
</method>
<method name="action_has_event">
@@ -40,7 +42,7 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Whether an action has an [InputEvent] associated with it.
+ Returns [true] if an action has an [InputEvent] associated with it.
</description>
</method>
<method name="add_action">
@@ -49,7 +51,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
+ Adds 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">
@@ -58,7 +60,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Remove an action from the [InputMap].
+ Removes an action from the [code]InputMap[/code].
</description>
</method>
<method name="event_is_action" qualifiers="const">
@@ -69,7 +71,7 @@
<argument index="1" name="action" type="String">
</argument>
<description>
- Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
+ Returns [true] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
</description>
</method>
<method name="get_action_list">
@@ -78,14 +80,14 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Return an array of InputEvents associated with a given action.
+ Returns an array of [InputEvent]s 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].
+ Returns an array of all actions in the [code]InputMap[/code].
</description>
</method>
<method name="has_action" qualifiers="const">
@@ -94,14 +96,14 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Whether this InputMap has a registered action with the given name.
+ Returns [code]true[/code] if the [code]InputMap[/code] has a registered action with the given name.
</description>
</method>
<method name="load_from_globals">
<return type="void">
</return>
<description>
- Clear the [InputMap] and load it anew from [ProjectSettings].
+ Clears all [InputEventAction] in the [code]InputMap[/code] and load it anew from [ProjectSettings].
</description>
</method>
</methods>