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:

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

Properties

bool

flat

true (parent override)

Theme Properties

StyleBox

disabled

StyleBox

focus

Font

font

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 )

StyleBox

hover

int

hseparation

3

StyleBox

normal

StyleBox

pressed

Theme Property Descriptions

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.


Font of the ToolButton‘s text.


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.


StyleBox used when the ToolButton is being hovered.


  • int hseparation

Default

3

The horizontal space between ToolButton‘s icon and text.


Default StyleBox for the ToolButton.


StyleBox used when the ToolButton is being pressed.