mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-27 06:07:14 +01:00
Expose various color themes for Button
This commit is contained in:
parent
6ca2dc959b
commit
b85570c541
@ -74,9 +74,30 @@
|
||||
<theme_item name="font_color_hover" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
|
||||
Text [Color] used when the [Button] is being hovered.
|
||||
</theme_item>
|
||||
<theme_item name="font_color_hover_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Text [Color] used when the [Button] is being hovered and pressed.
|
||||
</theme_item>
|
||||
<theme_item name="font_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Text [Color] used when the [Button] is being pressed.
|
||||
</theme_item>
|
||||
<theme_item name="icon_color_disabled" data_type="color" type="Color" default="Color( 1, 1, 1, 0.4 )">
|
||||
Icon modulate [Color] used when the [Button] is disabled.
|
||||
</theme_item>
|
||||
<theme_item name="icon_color_focus" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is focused. Only replaces the normal modulate color of the button. Disabled, hovered, and pressed states take precedence over this color.
|
||||
</theme_item>
|
||||
<theme_item name="icon_color_hover" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is being hovered.
|
||||
</theme_item>
|
||||
<theme_item name="icon_color_hover_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is being hovered and pressed.
|
||||
</theme_item>
|
||||
<theme_item name="icon_color_normal" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Default icon modulate [Color] of the [Button].
|
||||
</theme_item>
|
||||
<theme_item name="icon_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is being pressed.
|
||||
</theme_item>
|
||||
<theme_item name="hseparation" data_type="constant" type="int" default="2">
|
||||
The horizontal space between [Button]'s icon and text.
|
||||
</theme_item>
|
||||
|
@ -238,9 +238,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
||||
theme->set_color("font_color", "Button", control_font_color);
|
||||
theme->set_color("font_color_pressed", "Button", control_font_color_pressed);
|
||||
theme->set_color("font_color_hover", "Button", control_font_color_hover);
|
||||
theme->set_color("font_color_hover_pressed", "Button", control_font_color_pressed);
|
||||
theme->set_color("font_color_focus", "Button", control_font_color_focus);
|
||||
theme->set_color("font_color_disabled", "Button", control_font_color_disabled);
|
||||
|
||||
theme->set_color("icon_color_normal", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_color_pressed", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_color_hover", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_color_hover_pressed", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_color_focus", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_color_disabled", "Button", Color(1, 1, 1, 0.4));
|
||||
|
||||
theme->set_constant("hseparation", "Button", 2 * scale);
|
||||
|
||||
// LinkButton
|
||||
|
Loading…
Reference in New Issue
Block a user