diff options
author | bncastle <bncastle@pixelbytestudios.com> | 2018-03-05 20:37:10 -0500 |
---|---|---|
committer | bncastle <bncastle@pixelbytestudios.com> | 2018-03-05 20:37:10 -0500 |
commit | ceb079fa35fd837f29bc606cbde8346ba6c89c55 (patch) | |
tree | d571b62021a4ffdc8528d012393157b2ad2e9e25 /scene/gui | |
parent | 91ed6787088f888e196331915d59154ef2a6ce58 (diff) |
Fix BaseButton not always calling _pressed()
Fix "ui_accept" action in BaseButton.cpp not calling _pressed() func in
GDScript
Diffstat (limited to 'scene/gui')
-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 { |