TemplateButton ​
Inherits: MarginContainer
TemplateButton - Button for selecting character templates or custom creation Used in the character creation template list
Properties ​
Color | text_normal_color | Color(0.8, 0.8, 0.8) |
Color | text_highlight_color | Color(1.0, 1.0, 1.0) |
Color | active_background_color | Color(0.333, 0.486, 0.574) |
Color | inactive_background_color | Color(0.274, 0.4, 0.473) |
Color | border_selected_color | Color(1.0, 0.843, 0.0) |
Color | border_unselected_color | Color(0.5, 0.5, 0.5) |
bool | uses_icon | false |
Variables ​
CharacterDefinition | template | null |
bool | is_custom_option | false |
bool | selected | false |
Methods ​
void | setup_custom() |
void | setup_template( char_template: CharacterDefinition ) |
void | set_text( text: String ) |
void | set_selected( is_selected: bool ) |
Signals ​
pressed() ​
Emitted when the button is pressed.
template_selected( is_custom: bool, template: CharacterDefinition ) ​
Emitted when a template is picked (or the custom character).
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 active_background_color = Color(0.333, 0.486, 0.574) ​
The color of the background when it is the one picked.
Color inactive_background_color = Color(0.274, 0.4, 0.473) ​
The color of the background when it is not.
Color border_selected_color = Color(1.0, 0.843, 0.0) ​
Gold
Color border_unselected_color = Color(0.5, 0.5, 0.5) ​
Grey
bool uses_icon = false ​
True when the button shows an icon.
Variable descriptions ​
CharacterDefinition template = null ​
The template this button represents (null for "Custom Character")
bool is_custom_option = false ​
Whether this is the "Custom Character" option
bool selected = false ​
True when this is the template picked.
Method descriptions ​
void setup_custom() ​
Setup as "Custom Character" option
void setup_template( char_template: CharacterDefinition ) ​
Setup with a character template
void set_text( text: String ) ​
Set the button text directly
void set_selected( is_selected: bool ) ​
Set selection state