diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-10-17 09:53:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-17 09:53:52 +0200 |
commit | 15e324b1470009cb6560d98c146a353ae46110a4 (patch) | |
tree | 70eefd296366017f12d0c2fd08adcd7d8f327055 /scene/gui | |
parent | c7ea84241644e0ccb83e3ef9e36eff5cef509fc0 (diff) | |
parent | 6d21fd42d3713d8edd51f209e55358e2622aaa3a (diff) |
Merge pull request #6739 from bvbfan/patch-3
Button focus hovering
Diffstat (limited to 'scene/gui')
-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(); } } |