TouchScreenButton.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.1.2">
  3. <brief_description>
  4. Button for touch screen devices.
  5. </brief_description>
  6. <description>
  7. Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="is_pressed" qualifiers="const">
  13. <return type="bool">
  14. </return>
  15. <description>
  16. Returns [code]true[/code] if this button is currently pressed.
  17. </description>
  18. </method>
  19. </methods>
  20. <members>
  21. <member name="action" type="String" setter="set_action" getter="get_action">
  22. The button's action. Actions can be handled with [InputEventAction].
  23. </member>
  24. <member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask">
  25. The button's bitmask.
  26. </member>
  27. <member name="normal" type="Texture" setter="set_texture" getter="get_texture">
  28. The button's texture for the normal state.
  29. </member>
  30. <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled">
  31. If [code]true[/code], passby presses are enabled.
  32. </member>
  33. <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed">
  34. The button's texture for the pressed state.
  35. </member>
  36. <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
  37. The button's shape.
  38. </member>
  39. <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered">
  40. If [code]true[/code], the button's shape is centered.
  41. </member>
  42. <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible">
  43. If [code]true[/code], the button's shape is visible.
  44. </member>
  45. <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode">
  46. The button's visibility mode. See [code]VISIBILITY_*[/code] constants.
  47. </member>
  48. </members>
  49. <signals>
  50. <signal name="pressed">
  51. <description>
  52. Emitted when the button is pressed (down).
  53. </description>
  54. </signal>
  55. <signal name="released">
  56. <description>
  57. Emitted when the button is released (up).
  58. </description>
  59. </signal>
  60. </signals>
  61. <constants>
  62. <constant name="VISIBILITY_ALWAYS" value="0" enum="VisibilityMode">
  63. Always visible.
  64. </constant>
  65. <constant name="VISIBILITY_TOUCHSCREEN_ONLY" value="1" enum="VisibilityMode">
  66. Visible on touch screens only.
  67. </constant>
  68. </constants>
  69. </class>