2
0

TouchScreenButton.xml 2.5 KB

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