You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Added hover_pressed style to CheckBox and CheckButton
Added hover_pressed style to CheckBox and CheckButton. If no style is defined for this property it will default to the pressed property.
This commit is contained in:
@@ -88,6 +88,21 @@ void Button::_notification(int p_what) {
|
||||
if (has_color("icon_color_normal"))
|
||||
color_icon = get_color("icon_color_normal");
|
||||
} break;
|
||||
case DRAW_HOVER_PRESSED: {
|
||||
if (has_stylebox("hover_pressed") && has_stylebox_override("hover_pressed")) {
|
||||
style = get_stylebox("hover_pressed");
|
||||
if (!flat)
|
||||
style->draw(ci, Rect2(Point2(0, 0), size));
|
||||
if (has_color("font_color_hover_pressed"))
|
||||
color = get_color("font_color_hover_pressed");
|
||||
else
|
||||
color = get_color("font_color");
|
||||
if (has_color("icon_color_hover_pressed"))
|
||||
color_icon = get_color("icon_color_hover_pressed");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
case DRAW_PRESSED: {
|
||||
|
||||
style = get_stylebox("pressed");
|
||||
|
||||
Reference in New Issue
Block a user