Button.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Button" inherits="BaseButton" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Standard themed Button.
  5. </brief_description>
  6. <description>
  7. Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_button_icon" qualifiers="const">
  15. <return type="Texture">
  16. </return>
  17. <description>
  18. </description>
  19. </method>
  20. <method name="get_clip_text" qualifiers="const">
  21. <return type="bool">
  22. </return>
  23. <description>
  24. </description>
  25. </method>
  26. <method name="get_text" qualifiers="const">
  27. <return type="String">
  28. </return>
  29. <description>
  30. </description>
  31. </method>
  32. <method name="get_text_align" qualifiers="const">
  33. <return type="int" enum="Button.TextAlign">
  34. </return>
  35. <description>
  36. </description>
  37. </method>
  38. <method name="is_flat" qualifiers="const">
  39. <return type="bool">
  40. </return>
  41. <description>
  42. </description>
  43. </method>
  44. <method name="set_button_icon">
  45. <return type="void">
  46. </return>
  47. <argument index="0" name="texture" type="Texture">
  48. </argument>
  49. <description>
  50. </description>
  51. </method>
  52. <method name="set_clip_text">
  53. <return type="void">
  54. </return>
  55. <argument index="0" name="enabled" type="bool">
  56. </argument>
  57. <description>
  58. </description>
  59. </method>
  60. <method name="set_flat">
  61. <return type="void">
  62. </return>
  63. <argument index="0" name="enabled" type="bool">
  64. </argument>
  65. <description>
  66. </description>
  67. </method>
  68. <method name="set_text">
  69. <return type="void">
  70. </return>
  71. <argument index="0" name="text" type="String">
  72. </argument>
  73. <description>
  74. </description>
  75. </method>
  76. <method name="set_text_align">
  77. <return type="void">
  78. </return>
  79. <argument index="0" name="align" type="int" enum="Button.TextAlign">
  80. </argument>
  81. <description>
  82. </description>
  83. </method>
  84. </methods>
  85. <members>
  86. <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign">
  87. Text alignment policy for the button's text, use one of the ALIGN_* constants.
  88. </member>
  89. <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text">
  90. When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default.
  91. </member>
  92. <member name="flat" type="bool" setter="set_flat" getter="is_flat">
  93. Flat buttons don't display decoration.
  94. </member>
  95. <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon">
  96. Button's icon, if text is present the icon will be placed before the text.
  97. </member>
  98. <member name="text" type="String" setter="set_text" getter="get_text">
  99. The button's text that will be displayed inside the button's area.
  100. </member>
  101. </members>
  102. <constants>
  103. <constant name="ALIGN_LEFT" value="0">
  104. Align the text to the left.
  105. </constant>
  106. <constant name="ALIGN_CENTER" value="1">
  107. Align the text to the center.
  108. </constant>
  109. <constant name="ALIGN_RIGHT" value="2">
  110. Align the text to the right.
  111. </constant>
  112. </constants>
  113. <theme_items>
  114. <theme_item name="disabled" type="StyleBox">
  115. </theme_item>
  116. <theme_item name="focus" type="StyleBox">
  117. </theme_item>
  118. <theme_item name="font" type="Font">
  119. </theme_item>
  120. <theme_item name="font_color" type="Color">
  121. </theme_item>
  122. <theme_item name="font_color_disabled" type="Color">
  123. </theme_item>
  124. <theme_item name="font_color_hover" type="Color">
  125. </theme_item>
  126. <theme_item name="font_color_pressed" type="Color">
  127. </theme_item>
  128. <theme_item name="hover" type="StyleBox">
  129. </theme_item>
  130. <theme_item name="hseparation" type="int">
  131. </theme_item>
  132. <theme_item name="normal" type="StyleBox">
  133. </theme_item>
  134. <theme_item name="pressed" type="StyleBox">
  135. </theme_item>
  136. </theme_items>
  137. </class>