aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/macmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/macgui/macmenu.cpp')
-rw-r--r--graphics/macgui/macmenu.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index 48db04293f..aaa86ae5f4 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -836,13 +836,25 @@ bool MacMenu::mouseClick(int x, int y) {
renderSubmenu(it);
_contentIsDirty = true;
}
- } else if (_menuActivated && _activeItem != -1 && _activeSubItem != -1) {
+ } else if (_menuActivated && _activeSubItem != -1) {
+ if (_menustack.back()->subitems[_activeSubItem]->submenu != nullptr) {
+ if (_menustack.back()->subitems[_activeSubItem]->submenu->bbox.contains(x, y)) {
+ _menustack.push_back(_menustack.back()->subitems[_activeSubItem]->submenu);
+
+ _activeSubItem = 0;
+
+ return true;
+ }
+ }
+ } else if (_menuActivated && _activeItem != -1) {
_activeSubItem = -1;
if (_menustack.size()) {
renderSubmenu(_menustack.back());
_contentIsDirty = true;
}
+
+ return true;
}
return false;