ToolButton

Inherits: Button < BaseButton < Control < CanvasItem < Node < Object

Flat button helper class.

Description

This is a helper class to generate a flat Button (see Button.flat), creating a ToolButton is equivalent to:

var btn = Button.new()
btn.flat = true

Properties

bool

flat

true (parent override)

Theme Properties

Color

font_color

Color( 0.88, 0.88, 0.88, 1 )

Color

font_color_disabled

Color( 0.9, 0.95, 1, 0.3 )

Color

font_color_focus

Color( 0.94, 0.94, 0.94, 1 )

Color

font_color_hover

Color( 0.94, 0.94, 0.94, 1 )

Color

font_color_pressed

Color( 1, 1, 1, 1 )

int

hseparation

3

Font

font

StyleBox

disabled

StyleBox

focus

StyleBox

hover

StyleBox

normal

StyleBox

pressed

Theme Property Descriptions

Default

Color( 0.88, 0.88, 0.88, 1 )

Default text Color of the ToolButton.


  • Color font_color_disabled

Default

Color( 0.9, 0.95, 1, 0.3 )

Text Color used when the ToolButton is disabled.


Default

Color( 0.94, 0.94, 0.94, 1 )

Text Color used when the ToolButton is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.


Default

Color( 0.94, 0.94, 0.94, 1 )

Text Color used when the ToolButton is being hovered.


  • Color font_color_pressed

Default

Color( 1, 1, 1, 1 )

Text Color used when the ToolButton is being pressed.


  • int hseparation

Default

3

The horizontal space between ToolButton's icon and text.


Font of the ToolButton's text.


StyleBox used when the ToolButton is disabled.


StyleBox used when the ToolButton is focused. It is displayed over the current StyleBox, so using StyleBoxEmpty will just disable the focus visual effect.


StyleBox used when the ToolButton is being hovered.


Default StyleBox for the ToolButton.


StyleBox used when the ToolButton is being pressed.