From 6d21fd42d3713d8edd51f209e55358e2622aaa3a Mon Sep 17 00:00:00 2001 From: Anthony Fieroni Date: Fri, 7 Oct 2016 16:33:28 +0300 Subject: Button focus hovering Signed-off-by: Anthony Fieroni bvbfan@abv.bg --- scene/gui/base_button.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 6479dd2d02..64d68738b2 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -243,12 +243,22 @@ void BaseButton::_notification(int p_what) { update(); } } + + if (p_what==NOTIFICATION_FOCUS_ENTER) { + + status.hovering=true; + update(); + } if (p_what==NOTIFICATION_FOCUS_EXIT) { if (status.pressing_button && status.press_attempt) { status.press_attempt=false; status.pressing_button=0; + status.hovering=false; + update(); + } else if (status.hovering) { + status.hovering=false; update(); } } -- cgit v1.2.3