class_inputeventjoypadbutton.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. :github_url: hide
  2. .. meta::
  3. :keywords: gamepad, controller
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventJoypadButton.xml.
  8. .. _class_InputEventJoypadButton:
  9. InputEventJoypadButton
  10. ======================
  11. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  12. Represents a gamepad button being pressed or released.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>`.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`Using InputEvent <../tutorials/inputs/inputevent>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +-----------------------------------------------+-------------------------------------------------------------------------+-----------+
  27. | :ref:`JoyButton<enum_@GlobalScope_JoyButton>` | :ref:`button_index<class_InputEventJoypadButton_property_button_index>` | ``0`` |
  28. +-----------------------------------------------+-------------------------------------------------------------------------+-----------+
  29. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventJoypadButton_property_pressed>` | ``false`` |
  30. +-----------------------------------------------+-------------------------------------------------------------------------+-----------+
  31. | :ref:`float<class_float>` | :ref:`pressure<class_InputEventJoypadButton_property_pressure>` | ``0.0`` |
  32. +-----------------------------------------------+-------------------------------------------------------------------------+-----------+
  33. .. rst-class:: classref-section-separator
  34. ----
  35. .. rst-class:: classref-descriptions-group
  36. Property Descriptions
  37. ---------------------
  38. .. _class_InputEventJoypadButton_property_button_index:
  39. .. rst-class:: classref-property
  40. :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **button_index** = ``0`` :ref:`🔗<class_InputEventJoypadButton_property_button_index>`
  41. .. rst-class:: classref-property-setget
  42. - |void| **set_button_index**\ (\ value\: :ref:`JoyButton<enum_@GlobalScope_JoyButton>`\ )
  43. - :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **get_button_index**\ (\ )
  44. Button identifier. One of the :ref:`JoyButton<enum_@GlobalScope_JoyButton>` button constants.
  45. .. rst-class:: classref-item-separator
  46. ----
  47. .. _class_InputEventJoypadButton_property_pressed:
  48. .. rst-class:: classref-property
  49. :ref:`bool<class_bool>` **pressed** = ``false`` :ref:`🔗<class_InputEventJoypadButton_property_pressed>`
  50. .. rst-class:: classref-property-setget
  51. - |void| **set_pressed**\ (\ value\: :ref:`bool<class_bool>`\ )
  52. - :ref:`bool<class_bool>` **is_pressed**\ (\ )
  53. If ``true``, the button's state is pressed. If ``false``, the button's state is released.
  54. .. rst-class:: classref-item-separator
  55. ----
  56. .. _class_InputEventJoypadButton_property_pressure:
  57. .. rst-class:: classref-property
  58. :ref:`float<class_float>` **pressure** = ``0.0`` :ref:`🔗<class_InputEventJoypadButton_property_pressure>`
  59. .. rst-class:: classref-property-setget
  60. - |void| **set_pressure**\ (\ value\: :ref:`float<class_float>`\ )
  61. - :ref:`float<class_float>` **get_pressure**\ (\ )
  62. **Deprecated:** This property is never set by the engine and is always ``0``.
  63. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  64. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  65. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  66. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  67. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  68. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  69. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  70. .. |void| replace:: :abbr:`void (No return value.)`