Fixes BaseButton not triggering the "pressed" signal on "Button Press" Action Mode

This should fix #34935
This commit is contained in:
OverloadedOrama 2020-01-09 01:01:37 +02:00
parent b9a553f99d
commit bf4a0242ff

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