mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
classref: Sync with current master branch
This commit is contained in:
+72
-72
@@ -20,75 +20,75 @@ A Singleton that deals with inputs.
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`action_press<class_Input_action_press>` **(** :ref:`String<class_string>` action **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`action_release<class_Input_action_release>` **(** :ref:`String<class_string>` action **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_joy_mapping<class_Input_add_joy_mapping>` **(** :ref:`String<class_string>` mapping, :ref:`bool<class_bool>` update_existing=null **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_accelerometer<class_Input_get_accelerometer>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_connected_joypads<class_Input_get_connected_joypads>` **(** **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_gravity<class_Input_get_gravity>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_gyroscope<class_Input_get_gyroscope>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_joy_axis<class_Input_get_joy_axis>` **(** :ref:`int<class_int>` device, :ref:`int<class_int>` axis **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_joy_axis_index_from_string<class_Input_get_joy_axis_index_from_string>` **(** :ref:`String<class_string>` axis **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_axis_string<class_Input_get_joy_axis_string>` **(** :ref:`int<class_int>` axis_index **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_joy_button_index_from_string<class_Input_get_joy_button_index_from_string>` **(** :ref:`String<class_string>` button **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_button_string<class_Input_get_joy_button_string>` **(** :ref:`int<class_int>` button_index **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_guid<class_Input_get_joy_guid>` **(** :ref:`int<class_int>` device **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_name<class_Input_get_joy_name>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_joy_vibration_duration<class_Input_get_joy_vibration_duration>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_joy_vibration_strength<class_Input_get_joy_vibration_strength>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_last_mouse_speed<class_Input_get_last_mouse_speed>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_magnetometer<class_Input_get_magnetometer>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mouse_button_mask<class_Input_get_mouse_button_mask>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mouse_mode<class_Input_get_mouse_mode>` **(** **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_action_just_pressed<class_Input_is_action_just_pressed>` **(** :ref:`String<class_string>` action **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_action_just_released<class_Input_is_action_just_released>` **(** :ref:`String<class_string>` action **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_Input_is_action_pressed>` **(** :ref:`String<class_string>` action **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_joy_button_pressed<class_Input_is_joy_button_pressed>` **(** :ref:`int<class_int>` device, :ref:`int<class_int>` button **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_joy_known<class_Input_is_joy_known>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_key_pressed<class_Input_is_key_pressed>` **(** :ref:`int<class_int>` scancode **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_mouse_button_pressed<class_Input_is_mouse_button_pressed>` **(** :ref:`int<class_int>` button **)** const |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`parse_input_event<class_Input_parse_input_event>` **(** :ref:`InputEvent<class_inputevent>` event **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_joy_mapping<class_Input_remove_joy_mapping>` **(** :ref:`String<class_string>` guid **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_custom_mouse_cursor<class_Input_set_custom_mouse_cursor>` **(** :ref:`Resource<class_resource>` image, :ref:`Vector2<class_vector2>` hotspot=null **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_mouse_mode<class_Input_set_mouse_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`start_joy_vibration<class_Input_start_joy_vibration>` **(** :ref:`int<class_int>` device, :ref:`float<class_float>` weak_magnitude, :ref:`float<class_float>` strong_magnitude, :ref:`float<class_float>` duration=null **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop_joy_vibration<class_Input_stop_joy_vibration>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`warp_mouse_pos<class_Input_warp_mouse_pos>` **(** :ref:`Vector2<class_vector2>` to **)** |
|
||||
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`action_press<class_Input_action_press>` **(** :ref:`String<class_string>` action **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`action_release<class_Input_action_release>` **(** :ref:`String<class_string>` action **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_joy_mapping<class_Input_add_joy_mapping>` **(** :ref:`String<class_string>` mapping, :ref:`bool<class_bool>` update_existing=false **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_accelerometer<class_Input_get_accelerometer>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_array>` | :ref:`get_connected_joypads<class_Input_get_connected_joypads>` **(** **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_gravity<class_Input_get_gravity>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_gyroscope<class_Input_get_gyroscope>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_joy_axis<class_Input_get_joy_axis>` **(** :ref:`int<class_int>` device, :ref:`int<class_int>` axis **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_joy_axis_index_from_string<class_Input_get_joy_axis_index_from_string>` **(** :ref:`String<class_string>` axis **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_axis_string<class_Input_get_joy_axis_string>` **(** :ref:`int<class_int>` axis_index **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_joy_button_index_from_string<class_Input_get_joy_button_index_from_string>` **(** :ref:`String<class_string>` button **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_button_string<class_Input_get_joy_button_string>` **(** :ref:`int<class_int>` button_index **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_guid<class_Input_get_joy_guid>` **(** :ref:`int<class_int>` device **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_string>` | :ref:`get_joy_name<class_Input_get_joy_name>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_joy_vibration_duration<class_Input_get_joy_vibration_duration>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_joy_vibration_strength<class_Input_get_joy_vibration_strength>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_vector2>` | :ref:`get_last_mouse_speed<class_Input_get_last_mouse_speed>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_vector3>` | :ref:`get_magnetometer<class_Input_get_magnetometer>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mouse_button_mask<class_Input_get_mouse_button_mask>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_mouse_mode<class_Input_get_mouse_mode>` **(** **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_action_just_pressed<class_Input_is_action_just_pressed>` **(** :ref:`String<class_string>` action **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_action_just_released<class_Input_is_action_just_released>` **(** :ref:`String<class_string>` action **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_Input_is_action_pressed>` **(** :ref:`String<class_string>` action **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_joy_button_pressed<class_Input_is_joy_button_pressed>` **(** :ref:`int<class_int>` device, :ref:`int<class_int>` button **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_joy_known<class_Input_is_joy_known>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_key_pressed<class_Input_is_key_pressed>` **(** :ref:`int<class_int>` scancode **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_mouse_button_pressed<class_Input_is_mouse_button_pressed>` **(** :ref:`int<class_int>` button **)** const |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`parse_input_event<class_Input_parse_input_event>` **(** :ref:`InputEvent<class_inputevent>` event **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_joy_mapping<class_Input_remove_joy_mapping>` **(** :ref:`String<class_string>` guid **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_custom_mouse_cursor<class_Input_set_custom_mouse_cursor>` **(** :ref:`Resource<class_resource>` image, :ref:`Vector2<class_vector2>` hotspot=Vector2( 0, 0 ) **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_mouse_mode<class_Input_set_mouse_mode>` **(** :ref:`int<class_int>` mode **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`start_joy_vibration<class_Input_start_joy_vibration>` **(** :ref:`int<class_int>` device, :ref:`float<class_float>` weak_magnitude, :ref:`float<class_float>` strong_magnitude, :ref:`float<class_float>` duration=0 **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop_joy_vibration<class_Input_stop_joy_vibration>` **(** :ref:`int<class_int>` device **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`warp_mouse_pos<class_Input_warp_mouse_pos>` **(** :ref:`Vector2<class_vector2>` to **)** |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
@@ -127,7 +127,7 @@ If the specified action is already pressed, this will release it.
|
||||
|
||||
.. _class_Input_add_joy_mapping:
|
||||
|
||||
- void **add_joy_mapping** **(** :ref:`String<class_string>` mapping, :ref:`bool<class_bool>` update_existing=null **)**
|
||||
- void **add_joy_mapping** **(** :ref:`String<class_string>` mapping, :ref:`bool<class_bool>` update_existing=false **)**
|
||||
|
||||
Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
|
||||
|
||||
@@ -273,7 +273,7 @@ Removes all mappings from the internal db that match the given uid.
|
||||
|
||||
.. _class_Input_set_custom_mouse_cursor:
|
||||
|
||||
- void **set_custom_mouse_cursor** **(** :ref:`Resource<class_resource>` image, :ref:`Vector2<class_vector2>` hotspot=null **)**
|
||||
- void **set_custom_mouse_cursor** **(** :ref:`Resource<class_resource>` image, :ref:`Vector2<class_vector2>` hotspot=Vector2( 0, 0 ) **)**
|
||||
|
||||
.. _class_Input_set_mouse_mode:
|
||||
|
||||
@@ -283,7 +283,7 @@ Set the mouse mode. See the constants for more information.
|
||||
|
||||
.. _class_Input_start_joy_vibration:
|
||||
|
||||
- void **start_joy_vibration** **(** :ref:`int<class_int>` device, :ref:`float<class_float>` weak_magnitude, :ref:`float<class_float>` strong_magnitude, :ref:`float<class_float>` duration=null **)**
|
||||
- void **start_joy_vibration** **(** :ref:`int<class_int>` device, :ref:`float<class_float>` weak_magnitude, :ref:`float<class_float>` strong_magnitude, :ref:`float<class_float>` duration=0 **)**
|
||||
|
||||
Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user