summaryrefslogtreecommitdiff
path: root/scene/gui/base_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/base_button.cpp')
-rw-r--r--scene/gui/base_button.cpp10
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();
}
}