diff options
Diffstat (limited to 'scene/gui/menu_button.cpp')
-rw-r--r-- | scene/gui/menu_button.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index cf1f41d0fc..dc6c7fec28 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -44,7 +44,7 @@ void MenuButton::_unhandled_key_input(Ref<InputEvent> p_event) { return; } - if (p_event->is_pressed() && !p_event->is_echo() && (Object::cast_to<InputEventKey>(p_event.ptr()) || Object::cast_to<InputEventJoypadButton>(p_event.ptr()) || Object::cast_to<InputEventAction>(*p_event))) { + if (p_event->is_pressed() && !p_event->is_echo() && (Object::cast_to<InputEventKey>(p_event.ptr()) || Object::cast_to<InputEventJoypadButton>(p_event.ptr()) || Object::cast_to<InputEventAction>(*p_event) || Object::cast_to<InputEventShortcut>(*p_event))) { if (!get_parent() || !is_visible_in_tree() || is_disabled()) { return; } @@ -86,6 +86,7 @@ void MenuButton::_popup_visibility_changed(bool p_visible) { } void MenuButton::pressed() { + emit_signal(SNAME("about_to_popup")); Size2 size = get_size(); Point2 gp = get_screen_position(); |