class_inputeventmousebutton.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventMouseButton.xml.
  6. .. _class_InputEventMouseButton:
  7. InputEventMouseButton
  8. =====================
  9. **Inherits:** :ref:`InputEventMouse<class_InputEventMouse>` **<** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Input event type for mouse button events.
  11. Description
  12. -----------
  13. Contains mouse click information. See :ref:`Node._input<class_Node_method__input>`.
  14. Tutorials
  15. ---------
  16. - :doc:`Mouse and input coordinates <../tutorials/inputs/mouse_and_input_coordinates>`
  17. Properties
  18. ----------
  19. +---------------------------------------------------+------------------------------------------------------------------------+-----------+
  20. | :ref:`MouseButton<enum_@GlobalScope_MouseButton>` | :ref:`button_index<class_InputEventMouseButton_property_button_index>` | ``0`` |
  21. +---------------------------------------------------+------------------------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`double_click<class_InputEventMouseButton_property_double_click>` | ``false`` |
  23. +---------------------------------------------------+------------------------------------------------------------------------+-----------+
  24. | :ref:`float<class_float>` | :ref:`factor<class_InputEventMouseButton_property_factor>` | ``1.0`` |
  25. +---------------------------------------------------+------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventMouseButton_property_pressed>` | ``false`` |
  27. +---------------------------------------------------+------------------------------------------------------------------------+-----------+
  28. Property Descriptions
  29. ---------------------
  30. .. _class_InputEventMouseButton_property_button_index:
  31. - :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **button_index**
  32. +-----------+-------------------------+
  33. | *Default* | ``0`` |
  34. +-----------+-------------------------+
  35. | *Setter* | set_button_index(value) |
  36. +-----------+-------------------------+
  37. | *Getter* | get_button_index() |
  38. +-----------+-------------------------+
  39. The mouse button identifier, one of the :ref:`MouseButton<enum_@GlobalScope_MouseButton>` button or button wheel constants.
  40. ----
  41. .. _class_InputEventMouseButton_property_double_click:
  42. - :ref:`bool<class_bool>` **double_click**
  43. +-----------+-------------------------+
  44. | *Default* | ``false`` |
  45. +-----------+-------------------------+
  46. | *Setter* | set_double_click(value) |
  47. +-----------+-------------------------+
  48. | *Getter* | is_double_click() |
  49. +-----------+-------------------------+
  50. If ``true``, the mouse button's state is a double-click.
  51. ----
  52. .. _class_InputEventMouseButton_property_factor:
  53. - :ref:`float<class_float>` **factor**
  54. +-----------+-------------------+
  55. | *Default* | ``1.0`` |
  56. +-----------+-------------------+
  57. | *Setter* | set_factor(value) |
  58. +-----------+-------------------+
  59. | *Getter* | get_factor() |
  60. +-----------+-------------------+
  61. 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.
  62. ----
  63. .. _class_InputEventMouseButton_property_pressed:
  64. - :ref:`bool<class_bool>` **pressed**
  65. +-----------+--------------------+
  66. | *Default* | ``false`` |
  67. +-----------+--------------------+
  68. | *Setter* | set_pressed(value) |
  69. +-----------+--------------------+
  70. | *Getter* | is_pressed() |
  71. +-----------+--------------------+
  72. If ``true``, the mouse button's state is pressed. If ``false``, the mouse button's state is released.
  73. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  74. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  75. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  76. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  77. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  78. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`