class_inputeventmousebutton.rst 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.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. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Input event type for mouse button events.
  13. Properties
  14. ----------
  15. +---------------------------+------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`button_index<class_InputEventMouseButton_property_button_index>` |
  17. +---------------------------+------------------------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`doubleclick<class_InputEventMouseButton_property_doubleclick>` |
  19. +---------------------------+------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`factor<class_InputEventMouseButton_property_factor>` |
  21. +---------------------------+------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventMouseButton_property_pressed>` |
  23. +---------------------------+------------------------------------------------------------------------+
  24. Description
  25. -----------
  26. Contains mouse click information. See :ref:`Node._input<class_Node_method__input>`.
  27. Tutorials
  28. ---------
  29. - :doc:`../tutorials/inputs/mouse_and_input_coordinates`
  30. Property Descriptions
  31. ---------------------
  32. .. _class_InputEventMouseButton_property_button_index:
  33. - :ref:`int<class_int>` **button_index**
  34. +----------+-------------------------+
  35. | *Setter* | set_button_index(value) |
  36. +----------+-------------------------+
  37. | *Getter* | get_button_index() |
  38. +----------+-------------------------+
  39. Mouse button identifier, one of the BUTTON\_\* or BUTTON_WHEEL\_\* constants in :ref:`@GlobalScope<class_@GlobalScope>`.
  40. ----
  41. .. _class_InputEventMouseButton_property_doubleclick:
  42. - :ref:`bool<class_bool>` **doubleclick**
  43. +----------+------------------------+
  44. | *Setter* | set_doubleclick(value) |
  45. +----------+------------------------+
  46. | *Getter* | is_doubleclick() |
  47. +----------+------------------------+
  48. If ``true``, the mouse button's state is a double-click.
  49. ----
  50. .. _class_InputEventMouseButton_property_factor:
  51. - :ref:`float<class_float>` **factor**
  52. +----------+-------------------+
  53. | *Setter* | set_factor(value) |
  54. +----------+-------------------+
  55. | *Getter* | get_factor() |
  56. +----------+-------------------+
  57. Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported.
  58. ----
  59. .. _class_InputEventMouseButton_property_pressed:
  60. - :ref:`bool<class_bool>` **pressed**
  61. +----------+--------------------+
  62. | *Setter* | set_pressed(value) |
  63. +----------+--------------------+
  64. | *Getter* | is_pressed() |
  65. +----------+--------------------+
  66. If ``true``, the mouse button's state is pressed. If ``false``, the mouse button's state is released.