You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add focus font color to Button and derivatives
This commit is contained in:
@@ -84,9 +84,18 @@ void Button::_notification(int p_what) {
|
||||
if (!flat) {
|
||||
style->draw(ci, Rect2(Point2(0, 0), size));
|
||||
}
|
||||
color = get_color("font_color");
|
||||
if (has_color("icon_color_normal")) {
|
||||
color_icon = get_color("icon_color_normal");
|
||||
|
||||
// Focus colors only take precedence over normal state.
|
||||
if (has_focus()) {
|
||||
color = get_color("font_color_focus");
|
||||
if (has_color("icon_color_focus")) {
|
||||
color_icon = get_color("icon_color_focus");
|
||||
}
|
||||
} else {
|
||||
color = get_color("font_color");
|
||||
if (has_color("icon_color_normal")) {
|
||||
color_icon = get_color("icon_color_normal");
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case DRAW_HOVER_PRESSED: {
|
||||
|
||||
Reference in New Issue
Block a user