class_inputeventmousebutton.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InputEventMouseButton.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InputEventMouseButton:
  6. InputEventMouseButton
  7. =====================
  8. **Inherits:** :ref:`InputEventMouse<class_InputEventMouse>` **<** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Input event type for mouse button events.
  10. Description
  11. -----------
  12. Contains mouse click information. See :ref:`Node._input<class_Node_method__input>`.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/inputs/mouse_and_input_coordinates`
  16. Properties
  17. ----------
  18. +---------------------------+------------------------------------------------------------------------+-----------+
  19. | :ref:`int<class_int>` | :ref:`button_index<class_InputEventMouseButton_property_button_index>` | ``0`` |
  20. +---------------------------+------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`doubleclick<class_InputEventMouseButton_property_doubleclick>` | ``false`` |
  22. +---------------------------+------------------------------------------------------------------------+-----------+
  23. | :ref:`float<class_float>` | :ref:`factor<class_InputEventMouseButton_property_factor>` | ``1.0`` |
  24. +---------------------------+------------------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventMouseButton_property_pressed>` | ``false`` |
  26. +---------------------------+------------------------------------------------------------------------+-----------+
  27. Property Descriptions
  28. ---------------------
  29. .. _class_InputEventMouseButton_property_button_index:
  30. - :ref:`int<class_int>` **button_index**
  31. +-----------+-------------------------+
  32. | *Default* | ``0`` |
  33. +-----------+-------------------------+
  34. | *Setter* | set_button_index(value) |
  35. +-----------+-------------------------+
  36. | *Getter* | get_button_index() |
  37. +-----------+-------------------------+
  38. The mouse button identifier, one of the :ref:`ButtonList<enum_@GlobalScope_ButtonList>` button or button wheel constants.
  39. ----
  40. .. _class_InputEventMouseButton_property_doubleclick:
  41. - :ref:`bool<class_bool>` **doubleclick**
  42. +-----------+------------------------+
  43. | *Default* | ``false`` |
  44. +-----------+------------------------+
  45. | *Setter* | set_doubleclick(value) |
  46. +-----------+------------------------+
  47. | *Getter* | is_doubleclick() |
  48. +-----------+------------------------+
  49. If ``true``, the mouse button's state is a double-click.
  50. ----
  51. .. _class_InputEventMouseButton_property_factor:
  52. - :ref:`float<class_float>` **factor**
  53. +-----------+-------------------+
  54. | *Default* | ``1.0`` |
  55. +-----------+-------------------+
  56. | *Setter* | set_factor(value) |
  57. +-----------+-------------------+
  58. | *Getter* | get_factor() |
  59. +-----------+-------------------+
  60. The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be ``0`` if not supported.
  61. ----
  62. .. _class_InputEventMouseButton_property_pressed:
  63. - :ref:`bool<class_bool>` **pressed**
  64. +-----------+--------------------+
  65. | *Default* | ``false`` |
  66. +-----------+--------------------+
  67. | *Setter* | set_pressed(value) |
  68. +-----------+--------------------+
  69. | *Getter* | is_pressed() |
  70. +-----------+--------------------+
  71. If ``true``, the mouse button's state is pressed. If ``false``, the mouse button's state is released.
  72. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  73. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  74. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`