class_button.rst 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Button.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Button:
  6. Button
  7. ======
  8. **Inherits:** :ref:`BaseButton<class_BaseButton>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`CheckBox<class_CheckBox>`, :ref:`CheckButton<class_CheckButton>`, :ref:`ColorPickerButton<class_ColorPickerButton>`, :ref:`MenuButton<class_MenuButton>`, :ref:`OptionButton<class_OptionButton>`
  10. Standard themed Button.
  11. Description
  12. -----------
  13. Button is the standard themed button. It can contain text and an icon, and will display them according to the current :ref:`Theme<class_Theme>`.
  14. \ **Example of creating a button and assigning an action when pressed by code:**\
  15. .. tabs::
  16. .. code-tab:: gdscript
  17. func _ready():
  18. var button = Button.new()
  19. button.text = "Click me"
  20. button.connect("pressed", self, "_button_pressed")
  21. add_child(button)
  22. func _button_pressed():
  23. print("Hello world!")
  24. .. code-tab:: csharp
  25. public override void _Ready()
  26. {
  27. var button = new Button();
  28. button.Text = "Click me";
  29. button.Connect("pressed", this, nameof(ButtonPressed));
  30. AddChild(button);
  31. }
  32. private void ButtonPressed()
  33. {
  34. GD.Print("Hello world!");
  35. }
  36. Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code.
  37. See also :ref:`BaseButton<class_BaseButton>` which contains common properties and methods associated with this node.
  38. \ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton<class_TouchScreenButton>` for buttons that trigger gameplay movement or actions, as :ref:`TouchScreenButton<class_TouchScreenButton>` supports multitouch.
  39. Tutorials
  40. ---------
  41. - `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__
  42. - `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__
  43. Properties
  44. ----------
  45. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  46. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`alignment<class_Button_property_alignment>` | ``1`` |
  47. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  48. | :ref:`bool<class_bool>` | :ref:`clip_text<class_Button_property_clip_text>` | ``false`` |
  49. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  50. | :ref:`bool<class_bool>` | :ref:`expand_icon<class_Button_property_expand_icon>` | ``false`` |
  51. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  52. | :ref:`bool<class_bool>` | :ref:`flat<class_Button_property_flat>` | ``false`` |
  53. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  54. | :ref:`Texture2D<class_Texture2D>` | :ref:`icon<class_Button_property_icon>` | |
  55. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  56. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`icon_alignment<class_Button_property_icon_alignment>` | ``0`` |
  57. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  58. | :ref:`String<class_String>` | :ref:`language<class_Button_property_language>` | ``""`` |
  59. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  60. | :ref:`String<class_String>` | :ref:`text<class_Button_property_text>` | ``""`` |
  61. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  62. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_Button_property_text_direction>` | ``0`` |
  63. +-------------------------------------------------------------------+-------------------------------------------------------------+-----------+
  64. Methods
  65. -------
  66. +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`clear_opentype_features<class_Button_method_clear_opentype_features>` **(** **)** |
  68. +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`int<class_int>` | :ref:`get_opentype_feature<class_Button_method_get_opentype_feature>` **(** :ref:`String<class_String>` tag **)** |const| |
  70. +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`set_opentype_feature<class_Button_method_set_opentype_feature>` **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)** |
  72. +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  73. Theme Properties
  74. ----------------
  75. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  76. | :ref:`Color<class_Color>` | :ref:`font_color<class_Button_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  77. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  78. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_Button_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  79. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  80. | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_Button_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  81. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  82. | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_Button_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  83. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  84. | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_Button_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  85. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  86. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Button_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  87. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  88. | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_Button_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  89. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  90. | :ref:`Color<class_Color>` | :ref:`icon_disabled_color<class_Button_theme_color_icon_disabled_color>` | ``Color(1, 1, 1, 0.4)`` |
  91. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  92. | :ref:`Color<class_Color>` | :ref:`icon_focus_color<class_Button_theme_color_icon_focus_color>` | ``Color(1, 1, 1, 1)`` |
  93. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  94. | :ref:`Color<class_Color>` | :ref:`icon_hover_color<class_Button_theme_color_icon_hover_color>` | ``Color(1, 1, 1, 1)`` |
  95. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  96. | :ref:`Color<class_Color>` | :ref:`icon_hover_pressed_color<class_Button_theme_color_icon_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  97. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  98. | :ref:`Color<class_Color>` | :ref:`icon_normal_color<class_Button_theme_color_icon_normal_color>` | ``Color(1, 1, 1, 1)`` |
  99. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  100. | :ref:`Color<class_Color>` | :ref:`icon_pressed_color<class_Button_theme_color_icon_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  101. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  102. | :ref:`int<class_int>` | :ref:`hseparation<class_Button_theme_constant_hseparation>` | ``2`` |
  103. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  104. | :ref:`int<class_int>` | :ref:`outline_size<class_Button_theme_constant_outline_size>` | ``0`` |
  105. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  106. | :ref:`Font<class_Font>` | :ref:`font<class_Button_theme_font_font>` | |
  107. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`font_size<class_Button_theme_font_size_font_size>` | |
  109. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  110. | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_Button_theme_style_disabled>` | |
  111. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  112. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Button_theme_style_focus>` | |
  113. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  114. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_Button_theme_style_hover>` | |
  115. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  116. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_Button_theme_style_normal>` | |
  117. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  118. | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_Button_theme_style_pressed>` | |
  119. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  120. Property Descriptions
  121. ---------------------
  122. .. _class_Button_property_alignment:
  123. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment**
  124. +-----------+---------------------------+
  125. | *Default* | ``1`` |
  126. +-----------+---------------------------+
  127. | *Setter* | set_text_alignment(value) |
  128. +-----------+---------------------------+
  129. | *Getter* | get_text_alignment() |
  130. +-----------+---------------------------+
  131. Text alignment policy for the button's text, use one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants.
  132. ----
  133. .. _class_Button_property_clip_text:
  134. - :ref:`bool<class_bool>` **clip_text**
  135. +-----------+----------------------+
  136. | *Default* | ``false`` |
  137. +-----------+----------------------+
  138. | *Setter* | set_clip_text(value) |
  139. +-----------+----------------------+
  140. | *Getter* | get_clip_text() |
  141. +-----------+----------------------+
  142. 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.
  143. ----
  144. .. _class_Button_property_expand_icon:
  145. - :ref:`bool<class_bool>` **expand_icon**
  146. +-----------+------------------------+
  147. | *Default* | ``false`` |
  148. +-----------+------------------------+
  149. | *Setter* | set_expand_icon(value) |
  150. +-----------+------------------------+
  151. | *Getter* | is_expand_icon() |
  152. +-----------+------------------------+
  153. When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect.
  154. ----
  155. .. _class_Button_property_flat:
  156. - :ref:`bool<class_bool>` **flat**
  157. +-----------+-----------------+
  158. | *Default* | ``false`` |
  159. +-----------+-----------------+
  160. | *Setter* | set_flat(value) |
  161. +-----------+-----------------+
  162. | *Getter* | is_flat() |
  163. +-----------+-----------------+
  164. Flat buttons don't display decoration.
  165. ----
  166. .. _class_Button_property_icon:
  167. - :ref:`Texture2D<class_Texture2D>` **icon**
  168. +----------+------------------------+
  169. | *Setter* | set_button_icon(value) |
  170. +----------+------------------------+
  171. | *Getter* | get_button_icon() |
  172. +----------+------------------------+
  173. Button's icon, if text is present the icon will be placed before the text.
  174. To edit margin and spacing of the icon, use :ref:`hseparation<class_Button_theme_constant_hseparation>` theme property and ``content_margin_*`` properties of the used :ref:`StyleBox<class_StyleBox>`\ es.
  175. ----
  176. .. _class_Button_property_icon_alignment:
  177. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **icon_alignment**
  178. +-----------+---------------------------+
  179. | *Default* | ``0`` |
  180. +-----------+---------------------------+
  181. | *Setter* | set_icon_alignment(value) |
  182. +-----------+---------------------------+
  183. | *Getter* | get_icon_alignment() |
  184. +-----------+---------------------------+
  185. Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants as the text alignment. If centered, text will draw on top of the icon.
  186. ----
  187. .. _class_Button_property_language:
  188. - :ref:`String<class_String>` **language**
  189. +-----------+---------------------+
  190. | *Default* | ``""`` |
  191. +-----------+---------------------+
  192. | *Setter* | set_language(value) |
  193. +-----------+---------------------+
  194. | *Getter* | get_language() |
  195. +-----------+---------------------+
  196. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  197. ----
  198. .. _class_Button_property_text:
  199. - :ref:`String<class_String>` **text**
  200. +-----------+-----------------+
  201. | *Default* | ``""`` |
  202. +-----------+-----------------+
  203. | *Setter* | set_text(value) |
  204. +-----------+-----------------+
  205. | *Getter* | get_text() |
  206. +-----------+-----------------+
  207. The button's text that will be displayed inside the button's area.
  208. ----
  209. .. _class_Button_property_text_direction:
  210. - :ref:`TextDirection<enum_Control_TextDirection>` **text_direction**
  211. +-----------+---------------------------+
  212. | *Default* | ``0`` |
  213. +-----------+---------------------------+
  214. | *Setter* | set_text_direction(value) |
  215. +-----------+---------------------------+
  216. | *Getter* | get_text_direction() |
  217. +-----------+---------------------------+
  218. Base text writing direction.
  219. Method Descriptions
  220. -------------------
  221. .. _class_Button_method_clear_opentype_features:
  222. - void **clear_opentype_features** **(** **)**
  223. Removes all OpenType features.
  224. ----
  225. .. _class_Button_method_get_opentype_feature:
  226. - :ref:`int<class_int>` **get_opentype_feature** **(** :ref:`String<class_String>` tag **)** |const|
  227. Returns OpenType feature ``tag``.
  228. ----
  229. .. _class_Button_method_set_opentype_feature:
  230. - void **set_opentype_feature** **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)**
  231. Sets OpenType feature ``tag``. More info: `OpenType feature tags <https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags>`__.
  232. Theme Property Descriptions
  233. ---------------------------
  234. .. _class_Button_theme_color_font_color:
  235. - :ref:`Color<class_Color>` **font_color**
  236. +-----------+-----------------------------------+
  237. | *Default* | ``Color(0.875, 0.875, 0.875, 1)`` |
  238. +-----------+-----------------------------------+
  239. Default text :ref:`Color<class_Color>` of the ``Button``.
  240. ----
  241. .. _class_Button_theme_color_font_disabled_color:
  242. - :ref:`Color<class_Color>` **font_disabled_color**
  243. +-----------+-------------------------------------+
  244. | *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  245. +-----------+-------------------------------------+
  246. Text :ref:`Color<class_Color>` used when the ``Button`` is disabled.
  247. ----
  248. .. _class_Button_theme_color_font_focus_color:
  249. - :ref:`Color<class_Color>` **font_focus_color**
  250. +-----------+--------------------------------+
  251. | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
  252. +-----------+--------------------------------+
  253. Text :ref:`Color<class_Color>` used when the ``Button`` is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
  254. ----
  255. .. _class_Button_theme_color_font_hover_color:
  256. - :ref:`Color<class_Color>` **font_hover_color**
  257. +-----------+--------------------------------+
  258. | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
  259. +-----------+--------------------------------+
  260. Text :ref:`Color<class_Color>` used when the ``Button`` is being hovered.
  261. ----
  262. .. _class_Button_theme_color_font_hover_pressed_color:
  263. - :ref:`Color<class_Color>` **font_hover_pressed_color**
  264. +-----------+-----------------------+
  265. | *Default* | ``Color(1, 1, 1, 1)`` |
  266. +-----------+-----------------------+
  267. Text :ref:`Color<class_Color>` used when the ``Button`` is being hovered and pressed.
  268. ----
  269. .. _class_Button_theme_color_font_outline_color:
  270. - :ref:`Color<class_Color>` **font_outline_color**
  271. +-----------+-----------------------+
  272. | *Default* | ``Color(1, 1, 1, 1)`` |
  273. +-----------+-----------------------+
  274. The tint of text outline of the ``Button``.
  275. ----
  276. .. _class_Button_theme_color_font_pressed_color:
  277. - :ref:`Color<class_Color>` **font_pressed_color**
  278. +-----------+-----------------------+
  279. | *Default* | ``Color(1, 1, 1, 1)`` |
  280. +-----------+-----------------------+
  281. Text :ref:`Color<class_Color>` used when the ``Button`` is being pressed.
  282. ----
  283. .. _class_Button_theme_color_icon_disabled_color:
  284. - :ref:`Color<class_Color>` **icon_disabled_color**
  285. +-----------+-------------------------+
  286. | *Default* | ``Color(1, 1, 1, 0.4)`` |
  287. +-----------+-------------------------+
  288. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is disabled.
  289. ----
  290. .. _class_Button_theme_color_icon_focus_color:
  291. - :ref:`Color<class_Color>` **icon_focus_color**
  292. +-----------+-----------------------+
  293. | *Default* | ``Color(1, 1, 1, 1)`` |
  294. +-----------+-----------------------+
  295. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is focused. Only replaces the normal modulate color of the button. Disabled, hovered, and pressed states take precedence over this color.
  296. ----
  297. .. _class_Button_theme_color_icon_hover_color:
  298. - :ref:`Color<class_Color>` **icon_hover_color**
  299. +-----------+-----------------------+
  300. | *Default* | ``Color(1, 1, 1, 1)`` |
  301. +-----------+-----------------------+
  302. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being hovered.
  303. ----
  304. .. _class_Button_theme_color_icon_hover_pressed_color:
  305. - :ref:`Color<class_Color>` **icon_hover_pressed_color**
  306. +-----------+-----------------------+
  307. | *Default* | ``Color(1, 1, 1, 1)`` |
  308. +-----------+-----------------------+
  309. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being hovered and pressed.
  310. ----
  311. .. _class_Button_theme_color_icon_normal_color:
  312. - :ref:`Color<class_Color>` **icon_normal_color**
  313. +-----------+-----------------------+
  314. | *Default* | ``Color(1, 1, 1, 1)`` |
  315. +-----------+-----------------------+
  316. Default icon modulate :ref:`Color<class_Color>` of the ``Button``.
  317. ----
  318. .. _class_Button_theme_color_icon_pressed_color:
  319. - :ref:`Color<class_Color>` **icon_pressed_color**
  320. +-----------+-----------------------+
  321. | *Default* | ``Color(1, 1, 1, 1)`` |
  322. +-----------+-----------------------+
  323. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being pressed.
  324. ----
  325. .. _class_Button_theme_constant_hseparation:
  326. - :ref:`int<class_int>` **hseparation**
  327. +-----------+-------+
  328. | *Default* | ``2`` |
  329. +-----------+-------+
  330. The horizontal space between ``Button``'s icon and text.
  331. ----
  332. .. _class_Button_theme_constant_outline_size:
  333. - :ref:`int<class_int>` **outline_size**
  334. +-----------+-------+
  335. | *Default* | ``0`` |
  336. +-----------+-------+
  337. The size of the text outline.
  338. ----
  339. .. _class_Button_theme_font_font:
  340. - :ref:`Font<class_Font>` **font**
  341. :ref:`Font<class_Font>` of the ``Button``'s text.
  342. ----
  343. .. _class_Button_theme_font_size_font_size:
  344. - :ref:`int<class_int>` **font_size**
  345. Font size of the ``Button``'s text.
  346. ----
  347. .. _class_Button_theme_style_disabled:
  348. - :ref:`StyleBox<class_StyleBox>` **disabled**
  349. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is disabled.
  350. ----
  351. .. _class_Button_theme_style_focus:
  352. - :ref:`StyleBox<class_StyleBox>` **focus**
  353. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
  354. ----
  355. .. _class_Button_theme_style_hover:
  356. - :ref:`StyleBox<class_StyleBox>` **hover**
  357. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is being hovered.
  358. ----
  359. .. _class_Button_theme_style_normal:
  360. - :ref:`StyleBox<class_StyleBox>` **normal**
  361. Default :ref:`StyleBox<class_StyleBox>` for the ``Button``.
  362. ----
  363. .. _class_Button_theme_style_pressed:
  364. - :ref:`StyleBox<class_StyleBox>` **pressed**
  365. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is being pressed.
  366. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  367. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  368. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  369. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  370. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  371. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`