Standard themed Button. Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme]. [b]Example of creating a button and assigning an action when pressed by code:[/b] [codeblocks] [gdscript] func _ready(): var button = Button.new() button.text = "Click me" button.connect("pressed", self, "_button_pressed") add_child(button) func _button_pressed(): print("Hello world!") [/gdscript] [csharp] public override void _Ready() { var button = new Button(); button.Text = "Click me"; button.Connect("pressed", this, nameof(ButtonPressed)); AddChild(button); } private void ButtonPressed() { GD.Print("Hello world!"); } [/csharp] [/codeblocks] Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. See also [BaseButton] which contains common properties and methods associated with this node. [b]Note:[/b] 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 [TouchScreenButton] for buttons that trigger gameplay movement or actions, as [TouchScreenButton] supports multitouch. https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/677 Removes all OpenType features. Returns OpenType feature [code]tag[/code]. Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants. 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. When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. Flat buttons don't display decoration. Button's icon, if text is present the icon will be placed before the text. To edit margin and spacing of the icon, use [theme_item h_separation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es. Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum @GlobalScope.HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. The button's text that will be displayed inside the button's area. Base text writing direction. Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes. Default text [Color] of the [Button]. Text [Color] used when the [Button] is disabled. Text [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. Text [Color] used when the [Button] is being hovered. Text [Color] used when the [Button] is being hovered and pressed. The tint of text outline of the [Button]. Text [Color] used when the [Button] is being pressed. Icon modulate [Color] used when the [Button] is disabled. Icon modulate [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. Icon modulate [Color] used when the [Button] is being hovered. Icon modulate [Color] used when the [Button] is being hovered and pressed. Default icon modulate [Color] of the [Button]. Icon modulate [Color] used when the [Button] is being pressed. The horizontal space between [Button]'s icon and text. The size of the text outline. [Font] of the [Button]'s text. Font size of the [Button]'s text. [StyleBox] used when the [Button] is disabled. [StyleBox] used when the [Button] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. [StyleBox] used when the [Button] is being hovered. Default [StyleBox] for the [Button]. [StyleBox] used when the [Button] is being pressed.