class_touchscreenbutton.rst 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the TouchScreenButton.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_TouchScreenButton:
  5. TouchScreenButton
  6. =================
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Button for touch screen devices.
  12. Member Functions
  13. ----------------
  14. +--------------------------+-------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`is_pressed<class_TouchScreenButton_is_pressed>` **(** **)** const |
  16. +--------------------------+-------------------------------------------------------------------------+
  17. Signals
  18. -------
  19. .. _class_TouchScreenButton_pressed:
  20. - **pressed** **(** **)**
  21. Emitted when the button is pressed (down).
  22. .. _class_TouchScreenButton_released:
  23. - **released** **(** **)**
  24. Emitted when the button is released (up).
  25. Member Variables
  26. ----------------
  27. .. _class_TouchScreenButton_action:
  28. - :ref:`String<class_string>` **action** - The button's action. Actions can be handled with :ref:`InputEventAction<class_inputeventaction>`.
  29. .. _class_TouchScreenButton_bitmask:
  30. - :ref:`BitMap<class_bitmap>` **bitmask** - The button's bitmask.
  31. .. _class_TouchScreenButton_normal:
  32. - :ref:`Texture<class_texture>` **normal** - The button's texture for the normal state.
  33. .. _class_TouchScreenButton_passby_press:
  34. - :ref:`bool<class_bool>` **passby_press** - If ``true`` passby presses are enabled.
  35. .. _class_TouchScreenButton_pressed:
  36. - :ref:`Texture<class_texture>` **pressed** - The button's texture for the pressed state.
  37. .. _class_TouchScreenButton_shape:
  38. - :ref:`Shape2D<class_shape2d>` **shape** - The button's shape.
  39. .. _class_TouchScreenButton_shape_centered:
  40. - :ref:`bool<class_bool>` **shape_centered** - If ``true`` the button's shape is centered.
  41. .. _class_TouchScreenButton_shape_visible:
  42. - :ref:`bool<class_bool>` **shape_visible** - If ``true`` the button's shape is visible.
  43. .. _class_TouchScreenButton_visibility_mode:
  44. - :ref:`VisibilityMode<enum_touchscreenbutton_visibilitymode>` **visibility_mode** - The button's visibility mode. See ``VISIBILITY_*`` constants.
  45. Enums
  46. -----
  47. .. _enum_TouchScreenButton_VisibilityMode:
  48. enum **VisibilityMode**
  49. - **VISIBILITY_ALWAYS** = **0** --- Always visible.
  50. - **VISIBILITY_TOUCHSCREEN_ONLY** = **1** --- Visible on touch screens only.
  51. Description
  52. -----------
  53. Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices.
  54. Member Function Description
  55. ---------------------------
  56. .. _class_TouchScreenButton_is_pressed:
  57. - :ref:`bool<class_bool>` **is_pressed** **(** **)** const
  58. Returns ``true`` if this button is currently pressed.