diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 23 | ||||
-rw-r--r-- | graphics/macgui/macmenu.h | 2 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 1 |
3 files changed, 24 insertions, 2 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 54b9c9e91f..4594b6a156 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -954,12 +954,16 @@ bool MacMenu::mouseClick(int x, int y) { _items[_activeItem]->submenu->highlight = -1; } + if (!_menuActivated) + _wm->activateMenu(); + _menuActivated = true; _contentIsDirty = true; _wm->setFullRefresh(true); - _wm->activateMenu(); + if (_wm->_mode & kWMModalMenuMode) + eventLoop(); return true; } @@ -1185,4 +1189,21 @@ void MacMenu::disableAllMenus() { _contentIsDirty = true; } +void MacMenu::eventLoop() { + _contentIsDirty = true; + + while (_menuActivated) { + Common::Event event; + + while (g_system->getEventManager()->pollEvent(event)) { + processEvent(event); + + draw(_wm->_screen); + } + + g_system->updateScreen(); + g_system->delayMillis(10); + } +} + } // End of namespace Wage diff --git a/graphics/macgui/macmenu.h b/graphics/macgui/macmenu.h index 88f6e9bb74..c8633c0cc7 100644 --- a/graphics/macgui/macmenu.h +++ b/graphics/macgui/macmenu.h @@ -111,6 +111,8 @@ private: void drawSubMenuArrow(ManagedSurface *dst, int x, int y, int color); + void eventLoop(); + ItemArray _items; const Font *_font; diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index f48a2faf74..5d59e2d57a 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -240,7 +240,6 @@ void MacWindowManager::activateMenu() { return; if (_mode & kWMModalMenuMode) { - warning("HHERE"); if (!_screenCopy) _screenCopy = new ManagedSurface(*_screen); // Create a copy else |