Merge pull request #17293 from bncastle/basebutton_fix_pressed

Fix "ui_accept" action not calling _pressed() function in GDScript Button
This commit is contained in:
Hein-Pieter van Braam 2018-03-15 22:58:49 +01:00 committed by GitHub
commit 64b336b367
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,6 +211,11 @@ void BaseButton::_gui_input(Ref<InputEvent> p_event) {
if (!toggle_mode) { //mouse press attempt
pressed();
if (get_script_instance()) {
Variant::CallError ce;
get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
}
emit_signal("pressed");
} else {