Skip to content

ClassSelectionButton ​

Inherits: MarginContainer

ClassSelectionButton - Button for selecting a player class in character creation Displays class icon, name, and handles selection state

Properties ​

Colortext_normal_colorColor(0.8, 0.8, 0.8)
Colortext_highlight_colorColor(1.0, 1.0, 1.0)
Colorbrackets_active_colorColor(1.0, 0.843, 0.0)
Colorbrackets_inactive_colorColor(0.5, 0.5, 0.5)
Coloractive_colour_highlightColor(0.4, 0.6, 0.7)

Variables ​

PlayerClassDefinitionplayer_classnull
boolactivefalse

Methods ​

voidsetup( class_def: PlayerClassDefinition )
voidset_active( is_active: bool )
PlayerClassDefinitionget_player_class()

Signals ​

button_up( button: MarginContainer ) ​

Emitted when the button is released.

class_selected( player_class: PlayerClassDefinition ) ​

Emitted when the class is picked.

Property descriptions ​

Color text_normal_color = Color(0.8, 0.8, 0.8) ​

The color of the text.

Color text_highlight_color = Color(1.0, 1.0, 1.0) ​

The color of the text under the mouse.

Color brackets_active_color = Color(1.0, 0.843, 0.0) ​

Gold

Color brackets_inactive_color = Color(0.5, 0.5, 0.5) ​

Grey

Color active_colour_highlight = Color(0.4, 0.6, 0.7) ​

The color of the button when it is the one picked.

Variable descriptions ​

PlayerClassDefinition player_class = null ​

The PlayerClassDefinition this button represents

bool active = false ​

True when this is the class picked.

Method descriptions ​

void setup( class_def: PlayerClassDefinition ) ​

Setup the button with a PlayerClassDefinition

void set_active( is_active: bool ) ​

Set active state

PlayerClassDefinition get_player_class() ​

Get the associated player class