class_button.rst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  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:`TextAlign<enum_Button_TextAlign>` | :ref:`align<class_Button_property_align>` | ``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:`TextAlign<enum_Button_TextAlign>` | :ref:`icon_align<class_Button_property_icon_align>` | ``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:`StyleBox<class_StyleBox>` | :ref:`disabled<class_Button_theme_style_disabled>` | |
  77. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  78. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Button_theme_style_focus>` | |
  79. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  80. | :ref:`Font<class_Font>` | :ref:`font<class_Button_theme_font_font>` | |
  81. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  82. | :ref:`Color<class_Color>` | :ref:`font_color<class_Button_theme_color_font_color>` | ``Color(0.88, 0.88, 0.88, 1)`` |
  83. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  84. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_Button_theme_color_font_disabled_color>` | ``Color(0.9, 0.9, 0.9, 0.2)`` |
  85. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  86. | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_Button_theme_color_font_focus_color>` | ``Color(0.94, 0.94, 0.94, 1)`` |
  87. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  88. | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_Button_theme_color_font_hover_color>` | ``Color(0.94, 0.94, 0.94, 1)`` |
  89. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  90. | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_Button_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  91. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  92. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Button_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  93. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  94. | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_Button_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  95. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  96. | :ref:`int<class_int>` | :ref:`font_size<class_Button_theme_font_size_font_size>` | |
  97. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  98. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_Button_theme_style_hover>` | |
  99. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  100. | :ref:`int<class_int>` | :ref:`hseparation<class_Button_theme_constant_hseparation>` | ``2`` |
  101. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  102. | :ref:`Color<class_Color>` | :ref:`icon_disabled_color<class_Button_theme_color_icon_disabled_color>` | ``Color(1, 1, 1, 1)`` |
  103. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  104. | :ref:`Color<class_Color>` | :ref:`icon_focus_color<class_Button_theme_color_icon_focus_color>` | ``Color(1, 1, 1, 1)`` |
  105. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  106. | :ref:`Color<class_Color>` | :ref:`icon_hover_color<class_Button_theme_color_icon_hover_color>` | ``Color(1, 1, 1, 1)`` |
  107. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  108. | :ref:`Color<class_Color>` | :ref:`icon_hover_pressed_color<class_Button_theme_color_icon_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  109. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  110. | :ref:`Color<class_Color>` | :ref:`icon_normal_color<class_Button_theme_color_icon_normal_color>` | ``Color(1, 1, 1, 1)`` |
  111. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  112. | :ref:`Color<class_Color>` | :ref:`icon_pressed_color<class_Button_theme_color_icon_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  113. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  114. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_Button_theme_style_normal>` | |
  115. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  116. | :ref:`int<class_int>` | :ref:`outline_size<class_Button_theme_constant_outline_size>` | ``0`` |
  117. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  118. | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_Button_theme_style_pressed>` | |
  119. +---------------------------------+------------------------------------------------------------------------------------+--------------------------------+
  120. Enumerations
  121. ------------
  122. .. _enum_Button_TextAlign:
  123. .. _class_Button_constant_ALIGN_LEFT:
  124. .. _class_Button_constant_ALIGN_CENTER:
  125. .. _class_Button_constant_ALIGN_RIGHT:
  126. enum **TextAlign**:
  127. - **ALIGN_LEFT** = **0** --- Align the text to the left.
  128. - **ALIGN_CENTER** = **1** --- Align the text to the center.
  129. - **ALIGN_RIGHT** = **2** --- Align the text to the right.
  130. Property Descriptions
  131. ---------------------
  132. .. _class_Button_property_align:
  133. - :ref:`TextAlign<enum_Button_TextAlign>` **align**
  134. +-----------+-----------------------+
  135. | *Default* | ``1`` |
  136. +-----------+-----------------------+
  137. | *Setter* | set_text_align(value) |
  138. +-----------+-----------------------+
  139. | *Getter* | get_text_align() |
  140. +-----------+-----------------------+
  141. Text alignment policy for the button's text, use one of the :ref:`TextAlign<enum_Button_TextAlign>` constants.
  142. ----
  143. .. _class_Button_property_clip_text:
  144. - :ref:`bool<class_bool>` **clip_text**
  145. +-----------+----------------------+
  146. | *Default* | ``false`` |
  147. +-----------+----------------------+
  148. | *Setter* | set_clip_text(value) |
  149. +-----------+----------------------+
  150. | *Getter* | get_clip_text() |
  151. +-----------+----------------------+
  152. 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.
  153. ----
  154. .. _class_Button_property_expand_icon:
  155. - :ref:`bool<class_bool>` **expand_icon**
  156. +-----------+------------------------+
  157. | *Default* | ``false`` |
  158. +-----------+------------------------+
  159. | *Setter* | set_expand_icon(value) |
  160. +-----------+------------------------+
  161. | *Getter* | is_expand_icon() |
  162. +-----------+------------------------+
  163. When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect.
  164. ----
  165. .. _class_Button_property_flat:
  166. - :ref:`bool<class_bool>` **flat**
  167. +-----------+-----------------+
  168. | *Default* | ``false`` |
  169. +-----------+-----------------+
  170. | *Setter* | set_flat(value) |
  171. +-----------+-----------------+
  172. | *Getter* | is_flat() |
  173. +-----------+-----------------+
  174. Flat buttons don't display decoration.
  175. ----
  176. .. _class_Button_property_icon:
  177. - :ref:`Texture2D<class_Texture2D>` **icon**
  178. +----------+------------------------+
  179. | *Setter* | set_button_icon(value) |
  180. +----------+------------------------+
  181. | *Getter* | get_button_icon() |
  182. +----------+------------------------+
  183. Button's icon, if text is present the icon will be placed before the text.
  184. 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.
  185. ----
  186. .. _class_Button_property_icon_align:
  187. - :ref:`TextAlign<enum_Button_TextAlign>` **icon_align**
  188. +-----------+-----------------------+
  189. | *Default* | ``0`` |
  190. +-----------+-----------------------+
  191. | *Setter* | set_icon_align(value) |
  192. +-----------+-----------------------+
  193. | *Getter* | get_icon_align() |
  194. +-----------+-----------------------+
  195. Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same :ref:`TextAlign<enum_Button_TextAlign>` constants as the text alignment. If centered, text will draw on top of the icon.
  196. ----
  197. .. _class_Button_property_language:
  198. - :ref:`String<class_String>` **language**
  199. +-----------+---------------------+
  200. | *Default* | ``""`` |
  201. +-----------+---------------------+
  202. | *Setter* | set_language(value) |
  203. +-----------+---------------------+
  204. | *Getter* | get_language() |
  205. +-----------+---------------------+
  206. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  207. ----
  208. .. _class_Button_property_text:
  209. - :ref:`String<class_String>` **text**
  210. +-----------+-----------------+
  211. | *Default* | ``""`` |
  212. +-----------+-----------------+
  213. | *Setter* | set_text(value) |
  214. +-----------+-----------------+
  215. | *Getter* | get_text() |
  216. +-----------+-----------------+
  217. The button's text that will be displayed inside the button's area.
  218. ----
  219. .. _class_Button_property_text_direction:
  220. - :ref:`TextDirection<enum_Control_TextDirection>` **text_direction**
  221. +-----------+---------------------------+
  222. | *Default* | ``0`` |
  223. +-----------+---------------------------+
  224. | *Setter* | set_text_direction(value) |
  225. +-----------+---------------------------+
  226. | *Getter* | get_text_direction() |
  227. +-----------+---------------------------+
  228. Base text writing direction.
  229. Method Descriptions
  230. -------------------
  231. .. _class_Button_method_clear_opentype_features:
  232. - void **clear_opentype_features** **(** **)**
  233. Removes all OpenType features.
  234. ----
  235. .. _class_Button_method_get_opentype_feature:
  236. - :ref:`int<class_int>` **get_opentype_feature** **(** :ref:`String<class_String>` tag **)** |const|
  237. Returns OpenType feature ``tag``.
  238. ----
  239. .. _class_Button_method_set_opentype_feature:
  240. - void **set_opentype_feature** **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)**
  241. Sets OpenType feature ``tag``. More info: `OpenType feature tags <https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags>`__.
  242. Theme Property Descriptions
  243. ---------------------------
  244. .. _class_Button_theme_style_disabled:
  245. - :ref:`StyleBox<class_StyleBox>` **disabled**
  246. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is disabled.
  247. ----
  248. .. _class_Button_theme_style_focus:
  249. - :ref:`StyleBox<class_StyleBox>` **focus**
  250. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is focused. It is displayed over the current :ref:`StyleBox<class_StyleBox>`, so using :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` will just disable the focus visual effect.
  251. ----
  252. .. _class_Button_theme_font_font:
  253. - :ref:`Font<class_Font>` **font**
  254. :ref:`Font<class_Font>` of the ``Button``'s text.
  255. ----
  256. .. _class_Button_theme_color_font_color:
  257. - :ref:`Color<class_Color>` **font_color**
  258. +-----------+--------------------------------+
  259. | *Default* | ``Color(0.88, 0.88, 0.88, 1)`` |
  260. +-----------+--------------------------------+
  261. Default text :ref:`Color<class_Color>` of the ``Button``.
  262. ----
  263. .. _class_Button_theme_color_font_disabled_color:
  264. - :ref:`Color<class_Color>` **font_disabled_color**
  265. +-----------+-------------------------------+
  266. | *Default* | ``Color(0.9, 0.9, 0.9, 0.2)`` |
  267. +-----------+-------------------------------+
  268. Text :ref:`Color<class_Color>` used when the ``Button`` is disabled.
  269. ----
  270. .. _class_Button_theme_color_font_focus_color:
  271. - :ref:`Color<class_Color>` **font_focus_color**
  272. +-----------+--------------------------------+
  273. | *Default* | ``Color(0.94, 0.94, 0.94, 1)`` |
  274. +-----------+--------------------------------+
  275. 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.
  276. ----
  277. .. _class_Button_theme_color_font_hover_color:
  278. - :ref:`Color<class_Color>` **font_hover_color**
  279. +-----------+--------------------------------+
  280. | *Default* | ``Color(0.94, 0.94, 0.94, 1)`` |
  281. +-----------+--------------------------------+
  282. Text :ref:`Color<class_Color>` used when the ``Button`` is being hovered.
  283. ----
  284. .. _class_Button_theme_color_font_hover_pressed_color:
  285. - :ref:`Color<class_Color>` **font_hover_pressed_color**
  286. +-----------+-----------------------+
  287. | *Default* | ``Color(1, 1, 1, 1)`` |
  288. +-----------+-----------------------+
  289. Text :ref:`Color<class_Color>` used when the ``Button`` is being hovered and pressed.
  290. ----
  291. .. _class_Button_theme_color_font_outline_color:
  292. - :ref:`Color<class_Color>` **font_outline_color**
  293. +-----------+-----------------------+
  294. | *Default* | ``Color(1, 1, 1, 1)`` |
  295. +-----------+-----------------------+
  296. The tint of text outline of the ``Button``.
  297. ----
  298. .. _class_Button_theme_color_font_pressed_color:
  299. - :ref:`Color<class_Color>` **font_pressed_color**
  300. +-----------+-----------------------+
  301. | *Default* | ``Color(1, 1, 1, 1)`` |
  302. +-----------+-----------------------+
  303. Text :ref:`Color<class_Color>` used when the ``Button`` is being pressed.
  304. ----
  305. .. _class_Button_theme_font_size_font_size:
  306. - :ref:`int<class_int>` **font_size**
  307. Font size of the ``Button``'s text.
  308. ----
  309. .. _class_Button_theme_style_hover:
  310. - :ref:`StyleBox<class_StyleBox>` **hover**
  311. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is being hovered.
  312. ----
  313. .. _class_Button_theme_constant_hseparation:
  314. - :ref:`int<class_int>` **hseparation**
  315. +-----------+-------+
  316. | *Default* | ``2`` |
  317. +-----------+-------+
  318. The horizontal space between ``Button``'s icon and text.
  319. ----
  320. .. _class_Button_theme_color_icon_disabled_color:
  321. - :ref:`Color<class_Color>` **icon_disabled_color**
  322. +-----------+-----------------------+
  323. | *Default* | ``Color(1, 1, 1, 1)`` |
  324. +-----------+-----------------------+
  325. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is disabled.
  326. ----
  327. .. _class_Button_theme_color_icon_focus_color:
  328. - :ref:`Color<class_Color>` **icon_focus_color**
  329. +-----------+-----------------------+
  330. | *Default* | ``Color(1, 1, 1, 1)`` |
  331. +-----------+-----------------------+
  332. 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.
  333. ----
  334. .. _class_Button_theme_color_icon_hover_color:
  335. - :ref:`Color<class_Color>` **icon_hover_color**
  336. +-----------+-----------------------+
  337. | *Default* | ``Color(1, 1, 1, 1)`` |
  338. +-----------+-----------------------+
  339. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being hovered.
  340. ----
  341. .. _class_Button_theme_color_icon_hover_pressed_color:
  342. - :ref:`Color<class_Color>` **icon_hover_pressed_color**
  343. +-----------+-----------------------+
  344. | *Default* | ``Color(1, 1, 1, 1)`` |
  345. +-----------+-----------------------+
  346. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being hovered and pressed.
  347. ----
  348. .. _class_Button_theme_color_icon_normal_color:
  349. - :ref:`Color<class_Color>` **icon_normal_color**
  350. +-----------+-----------------------+
  351. | *Default* | ``Color(1, 1, 1, 1)`` |
  352. +-----------+-----------------------+
  353. Default icon modulate :ref:`Color<class_Color>` of the ``Button``.
  354. ----
  355. .. _class_Button_theme_color_icon_pressed_color:
  356. - :ref:`Color<class_Color>` **icon_pressed_color**
  357. +-----------+-----------------------+
  358. | *Default* | ``Color(1, 1, 1, 1)`` |
  359. +-----------+-----------------------+
  360. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being pressed.
  361. ----
  362. .. _class_Button_theme_style_normal:
  363. - :ref:`StyleBox<class_StyleBox>` **normal**
  364. Default :ref:`StyleBox<class_StyleBox>` for the ``Button``.
  365. ----
  366. .. _class_Button_theme_constant_outline_size:
  367. - :ref:`int<class_int>` **outline_size**
  368. +-----------+-------+
  369. | *Default* | ``0`` |
  370. +-----------+-------+
  371. The size of the text outline.
  372. ----
  373. .. _class_Button_theme_style_pressed:
  374. - :ref:`StyleBox<class_StyleBox>` **pressed**
  375. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is being pressed.
  376. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  377. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  378. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  379. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  380. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  381. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`