diff options
Diffstat (limited to 'scene/gui/menu_button.cpp')
-rw-r--r-- | scene/gui/menu_button.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 069a31d9d2..0252f25888 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -105,7 +105,11 @@ void MenuButton::pressed() { popup->set_current_index(0); } - popup->popup(); + if (popup->is_visible()) { + popup->hide(); + } else { + popup->popup(); + } } void MenuButton::gui_input(const Ref<InputEvent> &p_event) { |