mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
classref: Sync with current master branch (705b7a0)
This commit is contained in:
+53
-53
@@ -167,7 +167,7 @@ Signals
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**joy_connection_changed**\ (\ device\: :ref:`int<class_int>`, connected\: :ref:`bool<class_bool>`\ )
|
||||
**joy_connection_changed**\ (\ device\: :ref:`int<class_int>`, connected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Input_signal_joy_connection_changed>`
|
||||
|
||||
Emitted when a joypad device has been connected or disconnected.
|
||||
|
||||
@@ -184,7 +184,7 @@ Enumerations
|
||||
|
||||
.. rst-class:: classref-enumeration
|
||||
|
||||
enum **MouseMode**:
|
||||
enum **MouseMode**: :ref:`🔗<enum_Input_MouseMode>`
|
||||
|
||||
.. _class_Input_constant_MOUSE_MODE_VISIBLE:
|
||||
|
||||
@@ -236,7 +236,7 @@ Confines the mouse cursor to the game window, and make it hidden.
|
||||
|
||||
.. rst-class:: classref-enumeration
|
||||
|
||||
enum **CursorShape**:
|
||||
enum **CursorShape**: :ref:`🔗<enum_Input_CursorShape>`
|
||||
|
||||
.. _class_Input_constant_CURSOR_ARROW:
|
||||
|
||||
@@ -389,7 +389,7 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **emulate_mouse_from_touch**
|
||||
:ref:`bool<class_bool>` **emulate_mouse_from_touch** :ref:`🔗<class_Input_property_emulate_mouse_from_touch>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
@@ -406,7 +406,7 @@ If ``true``, sends mouse input events when tapping or swiping on the touchscreen
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **emulate_touch_from_mouse**
|
||||
:ref:`bool<class_bool>` **emulate_touch_from_mouse** :ref:`🔗<class_Input_property_emulate_touch_from_mouse>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
@@ -423,7 +423,7 @@ If ``true``, sends touch input events when clicking or dragging the mouse. See a
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`MouseMode<enum_Input_MouseMode>` **mouse_mode**
|
||||
:ref:`MouseMode<enum_Input_MouseMode>` **mouse_mode** :ref:`🔗<class_Input_property_mouse_mode>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
@@ -440,7 +440,7 @@ Controls the mouse mode. See :ref:`MouseMode<enum_Input_MouseMode>` for more inf
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **use_accumulated_input**
|
||||
:ref:`bool<class_bool>` **use_accumulated_input** :ref:`🔗<class_Input_property_use_accumulated_input>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
@@ -466,7 +466,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **action_press**\ (\ action\: :ref:`StringName<class_StringName>`, strength\: :ref:`float<class_float>` = 1.0\ )
|
||||
|void| **action_press**\ (\ action\: :ref:`StringName<class_StringName>`, strength\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Input_method_action_press>`
|
||||
|
||||
This will simulate pressing the specified action.
|
||||
|
||||
@@ -482,7 +482,7 @@ The strength can be used for non-boolean actions, it's ranged between 0 and 1 re
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **action_release**\ (\ action\: :ref:`StringName<class_StringName>`\ )
|
||||
|void| **action_release**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Input_method_action_release>`
|
||||
|
||||
If the specified action is already pressed, this will release it.
|
||||
|
||||
@@ -494,7 +494,7 @@ If the specified action is already pressed, this will release it.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **add_joy_mapping**\ (\ mapping\: :ref:`String<class_String>`, update_existing\: :ref:`bool<class_bool>` = false\ )
|
||||
|void| **add_joy_mapping**\ (\ mapping\: :ref:`String<class_String>`, update_existing\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Input_method_add_joy_mapping>`
|
||||
|
||||
Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
|
||||
|
||||
@@ -506,7 +506,7 @@ Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally up
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **flush_buffered_events**\ (\ )
|
||||
|void| **flush_buffered_events**\ (\ ) :ref:`🔗<class_Input_method_flush_buffered_events>`
|
||||
|
||||
Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input (:ref:`use_accumulated_input<class_Input_property_use_accumulated_input>`) or agile input flushing (:ref:`ProjectSettings.input_devices/buffering/agile_event_flushing<class_ProjectSettings_property_input_devices/buffering/agile_event_flushing>`).
|
||||
|
||||
@@ -520,7 +520,7 @@ The engine will already do this itself at key execution points (at least once pe
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_accelerometer**\ (\ ) |const|
|
||||
:ref:`Vector3<class_Vector3>` **get_accelerometer**\ (\ ) |const| :ref:`🔗<class_Input_method_get_accelerometer>`
|
||||
|
||||
Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`.
|
||||
|
||||
@@ -536,7 +536,7 @@ Note this method returns an empty :ref:`Vector3<class_Vector3>` when running fro
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_action_raw_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`float<class_float>` **get_action_raw_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_get_action_raw_strength>`
|
||||
|
||||
Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use :ref:`get_action_strength<class_Input_method_get_action_strength>` instead.
|
||||
|
||||
@@ -550,7 +550,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_action_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`float<class_float>` **get_action_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_get_action_strength>`
|
||||
|
||||
Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0 or 1.
|
||||
|
||||
@@ -564,7 +564,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_axis**\ (\ negative_action\: :ref:`StringName<class_StringName>`, positive_action\: :ref:`StringName<class_StringName>`\ ) |const|
|
||||
:ref:`float<class_float>` **get_axis**\ (\ negative_action\: :ref:`StringName<class_StringName>`, positive_action\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Input_method_get_axis>`
|
||||
|
||||
Get axis input by specifying two actions, one negative and one positive.
|
||||
|
||||
@@ -578,7 +578,7 @@ This is a shorthand for writing ``Input.get_action_strength("positive_action") -
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **get_connected_joypads**\ (\ )
|
||||
:ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **get_connected_joypads**\ (\ ) :ref:`🔗<class_Input_method_get_connected_joypads>`
|
||||
|
||||
Returns an :ref:`Array<class_Array>` containing the device IDs of all currently connected joypads.
|
||||
|
||||
@@ -590,7 +590,7 @@ Returns an :ref:`Array<class_Array>` containing the device IDs of all currently
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`CursorShape<enum_Input_CursorShape>` **get_current_cursor_shape**\ (\ ) |const|
|
||||
:ref:`CursorShape<enum_Input_CursorShape>` **get_current_cursor_shape**\ (\ ) |const| :ref:`🔗<class_Input_method_get_current_cursor_shape>`
|
||||
|
||||
Returns the currently assigned cursor shape (see :ref:`CursorShape<enum_Input_CursorShape>`).
|
||||
|
||||
@@ -602,7 +602,7 @@ Returns the currently assigned cursor shape (see :ref:`CursorShape<enum_Input_Cu
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_gravity**\ (\ ) |const|
|
||||
:ref:`Vector3<class_Vector3>` **get_gravity**\ (\ ) |const| :ref:`🔗<class_Input_method_get_gravity>`
|
||||
|
||||
Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`.
|
||||
|
||||
@@ -616,7 +616,7 @@ Returns the gravity in m/s² of the device's accelerometer sensor, if the device
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_gyroscope**\ (\ ) |const|
|
||||
:ref:`Vector3<class_Vector3>` **get_gyroscope**\ (\ ) |const| :ref:`🔗<class_Input_method_get_gyroscope>`
|
||||
|
||||
Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`.
|
||||
|
||||
@@ -630,7 +630,7 @@ Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyr
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_joy_axis**\ (\ device\: :ref:`int<class_int>`, axis\: :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`\ ) |const|
|
||||
:ref:`float<class_float>` **get_joy_axis**\ (\ device\: :ref:`int<class_int>`, axis\: :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`\ ) |const| :ref:`🔗<class_Input_method_get_joy_axis>`
|
||||
|
||||
Returns the current value of the joypad axis at given index (see :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`).
|
||||
|
||||
@@ -642,7 +642,7 @@ Returns the current value of the joypad axis at given index (see :ref:`JoyAxis<e
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_joy_guid**\ (\ device\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **get_joy_guid**\ (\ device\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Input_method_get_joy_guid>`
|
||||
|
||||
Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names and mappings based on this GUID.
|
||||
|
||||
@@ -654,7 +654,7 @@ Returns an SDL2-compatible device GUID on platforms that use gamepad remapping,
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Dictionary<class_Dictionary>` **get_joy_info**\ (\ device\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`Dictionary<class_Dictionary>` **get_joy_info**\ (\ device\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Input_method_get_joy_info>`
|
||||
|
||||
Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index.
|
||||
|
||||
@@ -680,7 +680,7 @@ On Linux:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_joy_name**\ (\ device\: :ref:`int<class_int>`\ )
|
||||
:ref:`String<class_String>` **get_joy_name**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_get_joy_name>`
|
||||
|
||||
Returns the name of the joypad at the specified device index, e.g. ``PS4 Controller``. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names.
|
||||
|
||||
@@ -692,7 +692,7 @@ Returns the name of the joypad at the specified device index, e.g. ``PS4 Control
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_joy_vibration_duration**\ (\ device\: :ref:`int<class_int>`\ )
|
||||
:ref:`float<class_float>` **get_joy_vibration_duration**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_get_joy_vibration_duration>`
|
||||
|
||||
Returns the duration of the current vibration effect in seconds.
|
||||
|
||||
@@ -704,7 +704,7 @@ Returns the duration of the current vibration effect in seconds.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **get_joy_vibration_strength**\ (\ device\: :ref:`int<class_int>`\ )
|
||||
:ref:`Vector2<class_Vector2>` **get_joy_vibration_strength**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_get_joy_vibration_strength>`
|
||||
|
||||
Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
|
||||
|
||||
@@ -716,7 +716,7 @@ Returns the strength of the joypad vibration: x is the strength of the weak moto
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **get_last_mouse_screen_velocity**\ (\ )
|
||||
:ref:`Vector2<class_Vector2>` **get_last_mouse_screen_velocity**\ (\ ) :ref:`🔗<class_Input_method_get_last_mouse_screen_velocity>`
|
||||
|
||||
Returns the last mouse velocity in screen coordinates. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.
|
||||
|
||||
@@ -728,7 +728,7 @@ Returns the last mouse velocity in screen coordinates. To provide a precise and
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **get_last_mouse_velocity**\ (\ )
|
||||
:ref:`Vector2<class_Vector2>` **get_last_mouse_velocity**\ (\ ) :ref:`🔗<class_Input_method_get_last_mouse_velocity>`
|
||||
|
||||
Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.
|
||||
|
||||
@@ -740,7 +740,7 @@ Returns the last mouse velocity. To provide a precise and jitter-free velocity,
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_magnetometer**\ (\ ) |const|
|
||||
:ref:`Vector3<class_Vector3>` **get_magnetometer**\ (\ ) |const| :ref:`🔗<class_Input_method_get_magnetometer>`
|
||||
|
||||
Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`.
|
||||
|
||||
@@ -754,7 +754,7 @@ Returns the magnetic field strength in micro-Tesla for all axes of the device's
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **get_mouse_button_mask**\ (\ ) |const|
|
||||
|bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **get_mouse_button_mask**\ (\ ) |const| :ref:`🔗<class_Input_method_get_mouse_button_mask>`
|
||||
|
||||
Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`DisplayServer.mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>`.
|
||||
|
||||
@@ -766,7 +766,7 @@ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **get_vector**\ (\ negative_x\: :ref:`StringName<class_StringName>`, positive_x\: :ref:`StringName<class_StringName>`, negative_y\: :ref:`StringName<class_StringName>`, positive_y\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>` = -1.0\ ) |const|
|
||||
:ref:`Vector2<class_Vector2>` **get_vector**\ (\ negative_x\: :ref:`StringName<class_StringName>`, positive_x\: :ref:`StringName<class_StringName>`, negative_y\: :ref:`StringName<class_StringName>`, positive_y\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>` = -1.0\ ) |const| :ref:`🔗<class_Input_method_get_vector>`
|
||||
|
||||
Gets an input vector by specifying four actions for the positive and negative X and Y axes.
|
||||
|
||||
@@ -782,7 +782,7 @@ By default, the deadzone is automatically calculated from the average of the act
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_action_just_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_action_just_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_is_action_just_pressed>`
|
||||
|
||||
Returns ``true`` when the user has *started* pressing the action event in the current frame or physics tick. It will only return ``true`` on the frame or tick that the user pressed down the button.
|
||||
|
||||
@@ -804,7 +804,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_action_just_released**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_action_just_released**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_is_action_just_released>`
|
||||
|
||||
Returns ``true`` when the user *stops* pressing the action event in the current frame or physics tick. It will only return ``true`` on the frame or tick that the user releases the button.
|
||||
|
||||
@@ -822,7 +822,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_action_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_action_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_is_action_pressed>`
|
||||
|
||||
Returns ``true`` if you are pressing the action event.
|
||||
|
||||
@@ -838,7 +838,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_anything_pressed**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_anything_pressed**\ (\ ) |const| :ref:`🔗<class_Input_method_is_anything_pressed>`
|
||||
|
||||
Returns ``true`` if any action, key, joypad button, or mouse button is being pressed. This will also return ``true`` if any action is simulated via code by calling :ref:`action_press<class_Input_method_action_press>`.
|
||||
|
||||
@@ -850,7 +850,7 @@ Returns ``true`` if any action, key, joypad button, or mouse button is being pre
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_joy_button_pressed**\ (\ device\: :ref:`int<class_int>`, button\: :ref:`JoyButton<enum_@GlobalScope_JoyButton>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_joy_button_pressed**\ (\ device\: :ref:`int<class_int>`, button\: :ref:`JoyButton<enum_@GlobalScope_JoyButton>`\ ) |const| :ref:`🔗<class_Input_method_is_joy_button_pressed>`
|
||||
|
||||
Returns ``true`` if you are pressing the joypad button (see :ref:`JoyButton<enum_@GlobalScope_JoyButton>`).
|
||||
|
||||
@@ -862,7 +862,7 @@ Returns ``true`` if you are pressing the joypad button (see :ref:`JoyButton<enum
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_joy_known**\ (\ device\: :ref:`int<class_int>`\ )
|
||||
:ref:`bool<class_bool>` **is_joy_known**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_is_joy_known>`
|
||||
|
||||
Returns ``true`` if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them.
|
||||
|
||||
@@ -874,7 +874,7 @@ Returns ``true`` if the system knows the specified device. This means that it se
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_key_label_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_key_label_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_Input_method_is_key_label_pressed>`
|
||||
|
||||
Returns ``true`` if you are pressing the key with the ``keycode`` printed on it. You can pass a :ref:`Key<enum_@GlobalScope_Key>` constant or any Unicode character code.
|
||||
|
||||
@@ -886,7 +886,7 @@ Returns ``true`` if you are pressing the key with the ``keycode`` printed on it.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_key_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_key_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_Input_method_is_key_pressed>`
|
||||
|
||||
Returns ``true`` if you are pressing the Latin key in the current keyboard layout. You can pass a :ref:`Key<enum_@GlobalScope_Key>` constant.
|
||||
|
||||
@@ -902,7 +902,7 @@ Returns ``true`` if you are pressing the Latin key in the current keyboard layou
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_mouse_button_pressed**\ (\ button\: :ref:`MouseButton<enum_@GlobalScope_MouseButton>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_mouse_button_pressed**\ (\ button\: :ref:`MouseButton<enum_@GlobalScope_MouseButton>`\ ) |const| :ref:`🔗<class_Input_method_is_mouse_button_pressed>`
|
||||
|
||||
Returns ``true`` if you are pressing the mouse button specified with :ref:`MouseButton<enum_@GlobalScope_MouseButton>`.
|
||||
|
||||
@@ -914,7 +914,7 @@ Returns ``true`` if you are pressing the mouse button specified with :ref:`Mouse
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_physical_key_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_physical_key_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_Input_method_is_physical_key_pressed>`
|
||||
|
||||
Returns ``true`` if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a :ref:`Key<enum_@GlobalScope_Key>` constant.
|
||||
|
||||
@@ -930,7 +930,7 @@ Returns ``true`` if you are pressing the key in the physical location on the 101
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **parse_input_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ )
|
||||
|void| **parse_input_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Input_method_parse_input_event>`
|
||||
|
||||
Feeds an :ref:`InputEvent<class_InputEvent>` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input<class_Node_private_method__input>` calls.
|
||||
|
||||
@@ -965,7 +965,7 @@ Feeds an :ref:`InputEvent<class_InputEvent>` to the game. Can be used to artific
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **remove_joy_mapping**\ (\ guid\: :ref:`String<class_String>`\ )
|
||||
|void| **remove_joy_mapping**\ (\ guid\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Input_method_remove_joy_mapping>`
|
||||
|
||||
Removes all mappings from the internal database that match the given GUID.
|
||||
|
||||
@@ -977,7 +977,7 @@ Removes all mappings from the internal database that match the given GUID.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_accelerometer**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||||
|void| **set_accelerometer**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_accelerometer>`
|
||||
|
||||
Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
|
||||
|
||||
@@ -991,7 +991,7 @@ Sets the acceleration value of the accelerometer sensor. Can be used for debuggi
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_custom_mouse_cursor**\ (\ image\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ )
|
||||
|void| **set_custom_mouse_cursor**\ (\ image\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_Input_method_set_custom_mouse_cursor>`
|
||||
|
||||
Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See :ref:`CursorShape<enum_Input_CursorShape>` for the list of shapes.
|
||||
|
||||
@@ -1013,7 +1013,7 @@ Sets a custom mouse cursor image, which is only visible inside the game window.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_default_cursor_shape**\ (\ shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0\ )
|
||||
|void| **set_default_cursor_shape**\ (\ shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0\ ) :ref:`🔗<class_Input_method_set_default_cursor_shape>`
|
||||
|
||||
Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR_ARROW<class_Input_constant_CURSOR_ARROW>`.
|
||||
|
||||
@@ -1029,7 +1029,7 @@ Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_gravity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||||
|void| **set_gravity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_gravity>`
|
||||
|
||||
Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
|
||||
|
||||
@@ -1043,7 +1043,7 @@ Sets the gravity value of the accelerometer sensor. Can be used for debugging on
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_gyroscope**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||||
|void| **set_gyroscope**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_gyroscope>`
|
||||
|
||||
Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
|
||||
|
||||
@@ -1057,7 +1057,7 @@ Sets the value of the rotation rate of the gyroscope sensor. Can be used for deb
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_magnetometer**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||||
|void| **set_magnetometer**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_magnetometer>`
|
||||
|
||||
Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
|
||||
|
||||
@@ -1071,7 +1071,7 @@ Sets the value of the magnetic field of the magnetometer sensor. Can be used for
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **should_ignore_device**\ (\ vendor_id\: :ref:`int<class_int>`, product_id\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **should_ignore_device**\ (\ vendor_id\: :ref:`int<class_int>`, product_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Input_method_should_ignore_device>`
|
||||
|
||||
Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable ``SDL_GAMECONTROLLER_IGNORE_DEVICES``. Read the `SDL documentation <https://wiki.libsdl.org/SDL2>`__ for more information.
|
||||
|
||||
@@ -1085,7 +1085,7 @@ Queries whether an input device should be ignored or not. Devices can be ignored
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **start_joy_vibration**\ (\ device\: :ref:`int<class_int>`, weak_magnitude\: :ref:`float<class_float>`, strong_magnitude\: :ref:`float<class_float>`, duration\: :ref:`float<class_float>` = 0\ )
|
||||
|void| **start_joy_vibration**\ (\ device\: :ref:`int<class_int>`, weak_magnitude\: :ref:`float<class_float>`, strong_magnitude\: :ref:`float<class_float>`, duration\: :ref:`float<class_float>` = 0\ ) :ref:`🔗<class_Input_method_start_joy_vibration>`
|
||||
|
||||
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). The vibration can be stopped early by calling :ref:`stop_joy_vibration<class_Input_method_stop_joy_vibration>`.
|
||||
|
||||
@@ -1101,7 +1101,7 @@ Starts to vibrate the joypad. Joypads usually come with two rumble motors, a str
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **stop_joy_vibration**\ (\ device\: :ref:`int<class_int>`\ )
|
||||
|void| **stop_joy_vibration**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_stop_joy_vibration>`
|
||||
|
||||
Stops the vibration of the joypad started with :ref:`start_joy_vibration<class_Input_method_start_joy_vibration>`.
|
||||
|
||||
@@ -1113,7 +1113,7 @@ Stops the vibration of the joypad started with :ref:`start_joy_vibration<class_I
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **vibrate_handheld**\ (\ duration_ms\: :ref:`int<class_int>` = 500, amplitude\: :ref:`float<class_float>` = -1.0\ )
|
||||
|void| **vibrate_handheld**\ (\ duration_ms\: :ref:`int<class_int>` = 500, amplitude\: :ref:`float<class_float>` = -1.0\ ) :ref:`🔗<class_Input_method_vibrate_handheld>`
|
||||
|
||||
**Note:** While ``amplitude`` expects a value between 0 and 1, -1 does the default amplitude for the device.
|
||||
|
||||
@@ -1137,7 +1137,7 @@ Vibrate the handheld device for the specified duration in milliseconds.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **warp_mouse**\ (\ position\: :ref:`Vector2<class_Vector2>`\ )
|
||||
|void| **warp_mouse**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Input_method_warp_mouse>`
|
||||
|
||||
Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user