diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2018-03-15 22:58:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-15 22:58:49 +0100 |
commit | 64b336b36745e9220ae44010144ea002e56ef351 (patch) | |
tree | 71c06b48ec396bf437748fa788021c7545c5dd9a | |
parent | b0186b41bbafc4d7ee50e3f9a92201ece1be64ea (diff) | |
parent | ceb079fa35fd837f29bc606cbde8346ba6c89c55 (diff) |
Merge pull request #17293 from bncastle/basebutton_fix_pressed
Fix "ui_accept" action not calling _pressed() function in GDScript Button
-rw-r--r-- | scene/gui/base_button.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 5f541ea16a..562dd155f9 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -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 { |