mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
GRAPHICS: MACGUI: Initial code for truly modal MacMenu
This commit is contained in:
parent
f724e672f8
commit
8c0590be77
@ -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
|
||||
|
@ -111,6 +111,8 @@ private:
|
||||
|
||||
void drawSubMenuArrow(ManagedSurface *dst, int x, int y, int color);
|
||||
|
||||
void eventLoop();
|
||||
|
||||
ItemArray _items;
|
||||
|
||||
const Font *_font;
|
||||
|
@ -240,7 +240,6 @@ void MacWindowManager::activateMenu() {
|
||||
return;
|
||||
|
||||
if (_mode & kWMModalMenuMode) {
|
||||
warning("HHERE");
|
||||
if (!_screenCopy)
|
||||
_screenCopy = new ManagedSurface(*_screen); // Create a copy
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user