summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/base_button.cpp5
-rw-r--r--scene/main/viewport.cpp2
2 files changed, 7 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 {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 4f702e8ed9..d4ec878bdf 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1934,6 +1934,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Ref<InputEventGesture> gesture_event = p_event;
if (gesture_event.is_valid()) {
+ gui.key_event_accepted = false;
+
_gui_cancel_tooltip();
Size2 pos = gesture_event->get_position();