:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Button.xml. .. _class_Button: Button ====== **Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`CheckBox`, :ref:`CheckButton`, :ref:`ColorPickerButton`, :ref:`MenuButton`, :ref:`OptionButton` A themed button that can contain text and an icon. .. rst-class:: classref-introduction-group Description ----------- **Button** is the standard themed button. It can contain text and an icon, and it will display them according to the current :ref:`Theme`. \ **Example:** Create a button and connect a method that will be called when the button is pressed: .. tabs:: .. code-tab:: gdscript func _ready(): var button = Button.new() button.text = "Click me" button.pressed.connect(_button_pressed) add_child(button) func _button_pressed(): print("Hello world!") .. code-tab:: csharp public override void _Ready() { var button = new Button(); button.Text = "Click me"; button.Pressed += ButtonPressed; AddChild(button); } private void ButtonPressed() { GD.Print("Hello world!"); } See also :ref:`BaseButton` which contains common properties and methods associated with this node. \ **Note:** Buttons do not detect touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions. .. rst-class:: classref-introduction-group Tutorials --------- - `2D Dodge The Creeps Demo `__ - `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | |bitfield|\[:ref:`LineBreakFlag`\] | :ref:`autowrap_trim_flags` | ``128`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`clip_text` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`expand_icon` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`flat` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`Texture2D` | :ref:`icon` | | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment` | :ref:`icon_alignment` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`language` | ``""`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`text` | ``""`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`VerticalAlignment` | :ref:`vertical_icon_alignment` | ``1`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Theme Properties ---------------- .. table:: :widths: auto +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_disabled_color` | ``Color(1, 1, 1, 0.4)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_focus_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_hover_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_normal_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`align_to_largest_stylebox` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`icon_max_width` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`line_spacing` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`font_size` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`icon` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`disabled` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`disabled_mirrored` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`focus` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`hover` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`hover_mirrored` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`hover_pressed` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`hover_pressed_mirrored` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`normal` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`normal_mirrored` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`pressed` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`pressed_mirrored` | | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Button_property_alignment: .. rst-class:: classref-property :ref:`HorizontalAlignment` **alignment** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_text_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) - :ref:`HorizontalAlignment` **get_text_alignment**\ (\ ) Text alignment policy for the button's text. .. rst-class:: classref-item-separator ---- .. _class_Button_property_autowrap_mode: .. rst-class:: classref-property :ref:`AutowrapMode` **autowrap_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode`\ ) - :ref:`AutowrapMode` **get_autowrap_mode**\ (\ ) If set to something other than :ref:`TextServer.AUTOWRAP_OFF`, the text gets wrapped inside the node's bounding rectangle. .. rst-class:: classref-item-separator ---- .. _class_Button_property_autowrap_trim_flags: .. rst-class:: classref-property |bitfield|\[:ref:`LineBreakFlag`\] **autowrap_trim_flags** = ``128`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_autowrap_trim_flags**\ (\ value\: |bitfield|\[:ref:`LineBreakFlag`\]\ ) - |bitfield|\[:ref:`LineBreakFlag`\] **get_autowrap_trim_flags**\ (\ ) Autowrap space trimming flags. See :ref:`TextServer.BREAK_TRIM_START_EDGE_SPACES` and :ref:`TextServer.BREAK_TRIM_END_EDGE_SPACES` for more info. .. rst-class:: classref-item-separator ---- .. _class_Button_property_clip_text: .. rst-class:: classref-property :ref:`bool` **clip_text** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_clip_text**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_clip_text**\ (\ ) If ``true``, text that is too large to fit the button is clipped horizontally. If ``false``, the button will always be wide enough to hold the text. The text is not vertically clipped, and the button's height is not affected by this property. .. rst-class:: classref-item-separator ---- .. _class_Button_property_expand_icon: .. rst-class:: classref-property :ref:`bool` **expand_icon** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_expand_icon**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_expand_icon**\ (\ ) When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also :ref:`icon_max_width`. .. rst-class:: classref-item-separator ---- .. _class_Button_property_flat: .. rst-class:: classref-property :ref:`bool` **flat** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_flat**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_flat**\ (\ ) Flat buttons don't display decoration. .. rst-class:: classref-item-separator ---- .. _class_Button_property_icon: .. rst-class:: classref-property :ref:`Texture2D` **icon** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_button_icon**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_button_icon**\ (\ ) Button's icon, if text is present the icon will be placed before the text. To edit margin and spacing of the icon, use :ref:`h_separation` theme property and ``content_margin_*`` properties of the used :ref:`StyleBox`\ es. .. rst-class:: classref-item-separator ---- .. _class_Button_property_icon_alignment: .. rst-class:: classref-property :ref:`HorizontalAlignment` **icon_alignment** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_icon_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) - :ref:`HorizontalAlignment` **get_icon_alignment**\ (\ ) Specifies if the icon should be aligned horizontally to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. .. rst-class:: classref-item-separator ---- .. _class_Button_property_language: .. rst-class:: classref-property :ref:`String` **language** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_language**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. .. rst-class:: classref-item-separator ---- .. _class_Button_property_text: .. rst-class:: classref-property :ref:`String` **text** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_text**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_text**\ (\ ) The button's text that will be displayed inside the button's area. .. rst-class:: classref-item-separator ---- .. _class_Button_property_text_direction: .. rst-class:: classref-property :ref:`TextDirection` **text_direction** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_text_direction**\ (\ value\: :ref:`TextDirection`\ ) - :ref:`TextDirection` **get_text_direction**\ (\ ) Base text writing direction. .. rst-class:: classref-item-separator ---- .. _class_Button_property_text_overrun_behavior: .. rst-class:: classref-property :ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior`\ ) - :ref:`OverrunBehavior` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds the node's bounding rectangle. .. rst-class:: classref-item-separator ---- .. _class_Button_property_vertical_icon_alignment: .. rst-class:: classref-property :ref:`VerticalAlignment` **vertical_icon_alignment** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_vertical_icon_alignment**\ (\ value\: :ref:`VerticalAlignment`\ ) - :ref:`VerticalAlignment` **get_vertical_icon_alignment**\ (\ ) Specifies if the icon should be aligned vertically to the top, bottom, or center of a button. Uses the same :ref:`VerticalAlignment` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_Button_theme_color_font_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗` Default text :ref:`Color` of the **Button**. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_disabled_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is disabled. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_focus_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` Text :ref:`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. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_hover_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is being hovered. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_hover_pressed_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is being hovered and pressed. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_outline_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` The tint of text outline of the **Button**. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_pressed_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is being pressed. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_disabled_color: .. rst-class:: classref-themeproperty :ref:`Color` **icon_disabled_color** = ``Color(1, 1, 1, 0.4)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is disabled. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_focus_color: .. rst-class:: classref-themeproperty :ref:`Color` **icon_focus_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`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. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_hover_color: .. rst-class:: classref-themeproperty :ref:`Color` **icon_hover_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is being hovered. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_hover_pressed_color: .. rst-class:: classref-themeproperty :ref:`Color` **icon_hover_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is being hovered and pressed. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_normal_color: .. rst-class:: classref-themeproperty :ref:`Color` **icon_normal_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Default icon modulate :ref:`Color` of the **Button**. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_pressed_color: .. rst-class:: classref-themeproperty :ref:`Color` **icon_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is being pressed. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_align_to_largest_stylebox: .. rst-class:: classref-themeproperty :ref:`int` **align_to_largest_stylebox** = ``0`` :ref:`🔗` This constant acts as a boolean. If ``true``, the minimum size of the button and text/icon alignment is always based on the largest stylebox margins, otherwise it's based on the current button state stylebox margins. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_h_separation: .. rst-class:: classref-themeproperty :ref:`int` **h_separation** = ``4`` :ref:`🔗` The horizontal space between **Button**'s icon and text. Negative values will be treated as ``0`` when used. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_icon_max_width: .. rst-class:: classref-themeproperty :ref:`int` **icon_max_width** = ``0`` :ref:`🔗` The maximum allowed width of the **Button**'s icon. This limit is applied on top of the default size of the icon, or its expanded size if :ref:`expand_icon` is ``true``. The height is adjusted according to the icon's ratio. If the button has additional icons (e.g. :ref:`CheckBox`), they will also be limited. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_line_spacing: .. rst-class:: classref-themeproperty :ref:`int` **line_spacing** = ``0`` :ref:`🔗` Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_outline_size: .. rst-class:: classref-themeproperty :ref:`int` **outline_size** = ``0`` :ref:`🔗` The size of the text outline. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_font_font: .. rst-class:: classref-themeproperty :ref:`Font` **font** :ref:`🔗` :ref:`Font` of the **Button**'s text. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_font_size_font_size: .. rst-class:: classref-themeproperty :ref:`int` **font_size** :ref:`🔗` Font size of the **Button**'s text. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_icon_icon: .. rst-class:: classref-themeproperty :ref:`Texture2D` **icon** :ref:`🔗` Default icon for the **Button**. Appears only if :ref:`icon` is not assigned. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_disabled: .. rst-class:: classref-themeproperty :ref:`StyleBox` **disabled** :ref:`🔗` :ref:`StyleBox` used when the **Button** is disabled. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_disabled_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **disabled_mirrored** :ref:`🔗` :ref:`StyleBox` used when the **Button** is disabled (for right-to-left layouts). .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_focus: .. rst-class:: classref-themeproperty :ref:`StyleBox` **focus** :ref:`🔗` :ref:`StyleBox` used when the **Button** is focused. The :ref:`focus` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being hovered. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover_mirrored** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being hovered (for right-to-left layouts). .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover_pressed: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover_pressed** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being pressed and hovered at the same time. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover_pressed_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover_pressed_mirrored** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being pressed and hovered at the same time (for right-to-left layouts). .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_normal: .. rst-class:: classref-themeproperty :ref:`StyleBox` **normal** :ref:`🔗` Default :ref:`StyleBox` for the **Button**. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_normal_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **normal_mirrored** :ref:`🔗` Default :ref:`StyleBox` for the **Button** (for right-to-left layouts). .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_pressed: .. rst-class:: classref-themeproperty :ref:`StyleBox` **pressed** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being pressed. .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_pressed_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **pressed_mirrored** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being pressed (for right-to-left layouts). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`