class_button - dragonsoulz/godot GitHub Wiki

Button

####Inherits: BaseButton ####Category: Core

Brief Description

Standard themed Button.

Member Functions

Description

Button is just the standard themed button: [image src="images/button_example.png"/] It can contain text and an icon, and will display them according to the current Theme.

Member Function Description

set_text

  • void set_text ( String text )

Set the button text, which will be displayed inside the button area.

get_text

Return the button text.

set_flat

  • void set_flat ( bool enabled )

Set the flat property of a Button. Flat buttons don"apos;t display decoration unless hoevered or pressed.

set_clip_text

  • void set_clip_text ( bool enabled )

Set the clip_text property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.

get_clip_text

  • bool get_clip_text ( ) const

Return the state of the clip_text property (see set_clip_text)

is_flat

  • bool is_flat ( ) const

Return the state of the flat property (see set_flat)