summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/base_button.cpp10
-rw-r--r--scene/main/viewport.cpp1
2 files changed, 10 insertions, 1 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index bc498f47bc..d7632b14b8 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -225,11 +225,21 @@ void BaseButton::_notification(int p_what) {
status.hovering=false;
update();
}
+ if (p_what==NOTIFICATION_DRAG_BEGIN) {
+
+ if (status.press_attempt) {
+ status.press_attempt=false;
+ status.pressing_button=0;
+ update();
+ }
+ }
+
if (p_what==NOTIFICATION_FOCUS_EXIT) {
if (status.pressing_button && status.press_attempt) {
status.press_attempt=false;
status.pressing_button=0;
+ update();
}
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a1df7062ea..3c52af1c1e 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1933,7 +1933,6 @@ void Viewport::_gui_input_event(InputEvent p_event) {
}
-
if (over!=gui.mouse_over) {
if (gui.mouse_over)