class_inputeventjoypadbutton.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the InputEventJoypadButton.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_InputEventJoypadButton:
  5. InputEventJoypadButton
  6. ======================
  7. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Input event for gamepad buttons.
  12. Properties
  13. ----------
  14. +---------------------------+----------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`button_index<class_InputEventJoypadButton_button_index>` |
  16. +---------------------------+----------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventJoypadButton_pressed>` |
  18. +---------------------------+----------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`pressure<class_InputEventJoypadButton_pressure>` |
  20. +---------------------------+----------------------------------------------------------------+
  21. Description
  22. -----------
  23. Input event type for gamepad buttons. For joysticks see :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>`.
  24. Tutorials
  25. ---------
  26. - :doc:`../tutorials/inputs/inputevent`
  27. Property Descriptions
  28. ---------------------
  29. .. _class_InputEventJoypadButton_button_index:
  30. - :ref:`int<class_int>` **button_index**
  31. +----------+-------------------------+
  32. | *Setter* | set_button_index(value) |
  33. +----------+-------------------------+
  34. | *Getter* | get_button_index() |
  35. +----------+-------------------------+
  36. Button identifier. One of the ``JOY_BUTTON_*`` constants from :ref:`@GlobalScope<class_@GlobalScope>`.
  37. .. _class_InputEventJoypadButton_pressed:
  38. - :ref:`bool<class_bool>` **pressed**
  39. +----------+--------------------+
  40. | *Setter* | set_pressed(value) |
  41. +----------+--------------------+
  42. | *Getter* | is_pressed() |
  43. +----------+--------------------+
  44. If ``true`` the button's state is pressed. If ``false`` the button's state is released.
  45. .. _class_InputEventJoypadButton_pressure:
  46. - :ref:`float<class_float>` **pressure**
  47. +----------+---------------------+
  48. | *Setter* | set_pressure(value) |
  49. +----------+---------------------+
  50. | *Getter* | get_pressure() |
  51. +----------+---------------------+
  52. Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from ``0`` to ``1``.