.. 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/docs/gdscript/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` .. container:: contribute There is currently no description for this class. Please help us by :ref:`contributing one `! .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :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:`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`` .. rst-class:: classref-property-setget - void **set_text_alignment** **(** :ref:`HorizontalAlignment` value **)** - :ref:`HorizontalAlignment` **get_text_alignment** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_autowrap_mode: .. rst-class:: classref-property :ref:`AutowrapMode` **autowrap_mode** = ``0`` .. rst-class:: classref-property-setget - void **set_autowrap_mode** **(** :ref:`AutowrapMode` value **)** - :ref:`AutowrapMode` **get_autowrap_mode** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_clip_text: .. rst-class:: classref-property :ref:`bool` **clip_text** = ``false`` .. rst-class:: classref-property-setget - void **set_clip_text** **(** :ref:`bool` value **)** - :ref:`bool` **get_clip_text** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_expand_icon: .. rst-class:: classref-property :ref:`bool` **expand_icon** = ``false`` .. rst-class:: classref-property-setget - void **set_expand_icon** **(** :ref:`bool` value **)** - :ref:`bool` **is_expand_icon** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_flat: .. rst-class:: classref-property :ref:`bool` **flat** = ``false`` .. rst-class:: classref-property-setget - void **set_flat** **(** :ref:`bool` value **)** - :ref:`bool` **is_flat** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_icon: .. rst-class:: classref-property :ref:`Texture2D` **icon** .. rst-class:: classref-property-setget - void **set_button_icon** **(** :ref:`Texture2D` value **)** - :ref:`Texture2D` **get_button_icon** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_icon_alignment: .. rst-class:: classref-property :ref:`HorizontalAlignment` **icon_alignment** = ``0`` .. rst-class:: classref-property-setget - void **set_icon_alignment** **(** :ref:`HorizontalAlignment` value **)** - :ref:`HorizontalAlignment` **get_icon_alignment** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_language: .. rst-class:: classref-property :ref:`String` **language** = ``""`` .. rst-class:: classref-property-setget - void **set_language** **(** :ref:`String` value **)** - :ref:`String` **get_language** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_text: .. rst-class:: classref-property :ref:`String` **text** = ``""`` .. rst-class:: classref-property-setget - void **set_text** **(** :ref:`String` value **)** - :ref:`String` **get_text** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_text_direction: .. rst-class:: classref-property :ref:`TextDirection` **text_direction** = ``0`` .. rst-class:: classref-property-setget - void **set_text_direction** **(** :ref:`TextDirection` value **)** - :ref:`TextDirection` **get_text_direction** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_text_overrun_behavior: .. rst-class:: classref-property :ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` .. rst-class:: classref-property-setget - void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** - :ref:`OverrunBehavior` **get_text_overrun_behavior** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_property_vertical_icon_alignment: .. rst-class:: classref-property :ref:`VerticalAlignment` **vertical_icon_alignment** = ``1`` .. rst-class:: classref-property-setget - void **set_vertical_icon_alignment** **(** :ref:`VerticalAlignment` value **)** - :ref:`VerticalAlignment` **get_vertical_icon_alignment** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. 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)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_align_to_largest_stylebox: .. rst-class:: classref-themeproperty :ref:`int` **align_to_largest_stylebox** = ``0`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_h_separation: .. rst-class:: classref-themeproperty :ref:`int` **h_separation** = ``4`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_icon_max_width: .. rst-class:: classref-themeproperty :ref:`int` **icon_max_width** = ``0`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_outline_size: .. rst-class:: classref-themeproperty :ref:`int` **outline_size** = ``0`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_font_font: .. rst-class:: classref-themeproperty :ref:`Font` **font** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_font_size_font_size: .. rst-class:: classref-themeproperty :ref:`int` **font_size** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_icon_icon: .. rst-class:: classref-themeproperty :ref:`Texture2D` **icon** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_disabled: .. rst-class:: classref-themeproperty :ref:`StyleBox` **disabled** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_disabled_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **disabled_mirrored** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_focus: .. rst-class:: classref-themeproperty :ref:`StyleBox` **focus** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover_mirrored** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover_pressed: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover_pressed** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover_pressed_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **hover_pressed_mirrored** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_normal: .. rst-class:: classref-themeproperty :ref:`StyleBox` **normal** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_normal_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **normal_mirrored** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_pressed: .. rst-class:: classref-themeproperty :ref:`StyleBox` **pressed** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_pressed_mirrored: .. rst-class:: classref-themeproperty :ref:`StyleBox` **pressed_mirrored** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |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.)`