summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-01-10 10:35:11 +0100
committerGitHub <noreply@github.com>2020-01-10 10:35:11 +0100
commit59a2fed1e62c6cee6433054956a15a2506552829 (patch)
treec0766ba76c6f985ded5486543295676fe21fa872 /scene/gui
parentc51c7eb5bd173906259ad6bf04714191b7563e2c (diff)
parentbf4a0242fff2152ce7983d811c1cac8b8acf27ba (diff)
Merge pull request #34938 from OverloadedOrama/fix-basebutton-button-press
Fixes BaseButton not triggering the pressed signal on "Button Press"…
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/base_button.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 65912c1c07..b2020d44e8 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -165,7 +165,7 @@ void BaseButton::on_action_event(Ref<InputEvent> p_event) {
_pressed();
}
} else {
- if (!p_event->is_pressed()) {
+ if ((p_event->is_pressed() && action_mode == ACTION_MODE_BUTTON_PRESS) || (!p_event->is_pressed() && action_mode == ACTION_MODE_BUTTON_RELEASE)) {
_pressed();
}
}