ColorButton ​
Inherits: MarginContainer
ColorButton - Button that displays and selects a color Used in character creation for skin, hair, and eye color selection
Properties ​
Color | button_color | Color.WHITE: |
Color | border_selected_color | Color(1.0, 0.843, 0.0) |
Color | border_unselected_color | Color(0.5, 0.5, 0.5) |
Variables ​
bool | selected | false: |
Methods ​
void | set_color( color: Color ) |
Color | get_color() |
void | set_selected( is_selected: bool ) |
void | toggle_selected() |
Signals ​
pressed() ​
Emitted when the button is pressed.
color_selected( color: Color ) ​
Emitted when the color is picked.
Property descriptions ​
Color button_color = Color.WHITE: ​
The color the button shows and picks.
Color border_selected_color = Color(1.0, 0.843, 0.0) ​
Gold
Color border_unselected_color = Color(0.5, 0.5, 0.5) ​
Grey
Variable descriptions ​
bool selected = false: ​
True when this is the color picked.
Method descriptions ​
void set_color( color: Color ) ​
Set the button's color
Color get_color() ​
Get the button's color
void set_selected( is_selected: bool ) ​
Set selected state
void toggle_selected() ​
Toggle selection state