From ecab01a2208a3622261d54fd5790ad57b409a348 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 17 Oct 2018 22:45:06 +0200 Subject: [PATCH] Draw Button's "focus" style as an overlay to other styles Focus styles in existing projects should be tweaked to make the base style (normal/hover/pressed) visible. This closes #4575. --- scene/gui/button.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 2d17fb13912b..fbfe904d58a6 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -140,8 +140,8 @@ void Button::_notification(int p_what) { if (has_focus()) { - Ref style = get_stylebox("focus"); - style->draw(ci, Rect2(Point2(), size)); + Ref hover_style = get_stylebox("focus"); + hover_style->draw(ci, Rect2(Point2(), size)); } Ref font = get_font("font");