Fix BaseButton not always calling _pressed()
Fix "ui_accept" action in BaseButton.cpp not calling _pressed() func in
GDScript
(cherry picked from commit ceb079fa35
)
This commit is contained in:
parent
73cc3a96c0
commit
449e75455b
|
@ -211,6 +211,11 @@ void BaseButton::_gui_input(Ref<InputEvent> p_event) {
|
||||||
if (!toggle_mode) { //mouse press attempt
|
if (!toggle_mode) { //mouse press attempt
|
||||||
|
|
||||||
pressed();
|
pressed();
|
||||||
|
if (get_script_instance()) {
|
||||||
|
Variant::CallError ce;
|
||||||
|
get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
|
||||||
|
}
|
||||||
|
|
||||||
emit_signal("pressed");
|
emit_signal("pressed");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue