Merge pull request #34938 from OverloadedOrama/fix-basebutton-button-press

Fixes BaseButton not triggering the pressed signal on "Button Press"…
This commit is contained in:
Rémi Verschelde 2020-01-10 10:35:11 +01:00 committed by GitHub
commit 59a2fed1e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}
}