diff options
author | Anthony Fieroni <bvbfan@abv.bg> | 2016-10-07 16:33:28 +0300 |
---|---|---|
committer | Anthony Fieroni <bvbfan@abv.bg> | 2016-10-10 10:34:18 +0300 |
commit | 6d21fd42d3713d8edd51f209e55358e2622aaa3a (patch) | |
tree | 34bb47e06c059d52a7dd24a898e22258904800d6 /scene | |
parent | 1f9e16119f2b17fa507bdee8529459ed91f27b8c (diff) |
Button focus hovering
Signed-off-by: Anthony Fieroni bvbfan@abv.bg
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/base_button.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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(); } } |