Skip to content

Latest commit

 

History

History
109 lines (67 loc) · 4.25 KB

class_inputeventjoypadbutton.rst

File metadata and controls

109 lines (67 loc) · 4.25 KB
github_url:hide

InputEventJoypadButton

Inherits: :ref:`InputEvent<class_InputEvent>` < :ref:`Resource<class_Resource>` < :ref:`RefCounted<class_RefCounted>` < :ref:`Object<class_Object>`

Represents a gamepad button being pressed or released.

.. rst-class:: classref-introduction-group

Description

Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>`.

.. rst-class:: classref-introduction-group

Tutorials

.. rst-class:: classref-reftable-group

Properties

:ref:`JoyButton<enum_@GlobalScope_JoyButton>` :ref:`button_index<class_InputEventJoypadButton_property_button_index>` 0
:ref:`bool<class_bool>` :ref:`pressed<class_InputEventJoypadButton_property_pressed>` false
:ref:`float<class_float>` :ref:`pressure<class_InputEventJoypadButton_property_pressure>` 0.0
.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Property Descriptions

.. rst-class:: classref-property

:ref:`JoyButton<enum_@GlobalScope_JoyButton>` button_index = 0

.. rst-class:: classref-property-setget

Button identifier. One of the :ref:`JoyButton<enum_@GlobalScope_JoyButton>` button constants.

.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`bool<class_bool>` pressed = false

.. rst-class:: classref-property-setget

If true, the button's state is pressed. If false, the button's state is released.

.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`float<class_float>` pressure = 0.0

.. rst-class:: classref-property-setget

Represents the pressure the user puts on the button with their finger, if the controller supports it. Ranges from 0 to 1.