1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix BaseButton not always calling _pressed()

Fix "ui_accept" action in BaseButton.cpp not calling _pressed() func in
GDScript
This commit is contained in:
bncastle
2018-03-05 20:37:10 -05:00
parent 91ed678708
commit ceb079fa35

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 {