diff options
author | Eugene Sandulenko | 2016-04-25 19:02:25 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-04-25 19:02:25 +0200 |
commit | 3a9159c5a34c891b10ff6b44d6982eda717e48f7 (patch) | |
tree | 227679ee07ea22aa6334b9edf638bbdb45fb9b6a /engines/wage/gui.cpp | |
parent | 35d5d93725a4a554b1f0ddc8009d9595c950476b (diff) | |
download | scummvm-rg350-3a9159c5a34c891b10ff6b44d6982eda717e48f7.tar.gz scummvm-rg350-3a9159c5a34c891b10ff6b44d6982eda717e48f7.tar.bz2 scummvm-rg350-3a9159c5a34c891b10ff6b44d6982eda717e48f7.zip |
WAGE: Made Menu subclass of BaseMacWindow
Diffstat (limited to 'engines/wage/gui.cpp')
-rw-r--r-- | engines/wage/gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 5aacb96eaa..8aaad70cd3 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -187,7 +187,7 @@ Gui::Gui(WageEngine *engine) { g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "wageCursor"); - _menu = new Menu(this); + _menu = _wm.addMenu(this); _sceneWindow = _wm.addWindow(false, false); _sceneWindow->setCallback(sceneWindowCallback, this); @@ -235,7 +235,7 @@ void Gui::draw() { if (_menuDirty) { _wm.setFullRefresh(true); _wm.draw(); - _menu->render(); + _menu->draw(&_screen); } _menuDirty = false; @@ -264,7 +264,7 @@ void Gui::draw() { _wm.draw(); if (_menuDirty) - _menu->render(); + _menu->draw(&_screen); if (_cursorDirty && _cursorRect.left < _screen.w && _cursorRect.bottom < _screen.h) { g_system->copyRectToScreen(_screen.getBasePtr(_cursorRect.left, _cursorRect.top), _screen.pitch, @@ -487,7 +487,7 @@ void Gui::processMenuShortCut(byte flags, uint16 ascii) { } void Gui::mouseMove(int x, int y) { - if (_menu->_menuActivated) { + if (_menu->hasAllFocus()) { if (_menu->mouseMove(x, y)) _menuDirty = true; @@ -526,7 +526,7 @@ bool Gui::processEvent(Common::Event &event) { } void Gui::mouseUp(int x, int y) { - if (_menu->_menuActivated) { + if (_menu->hasAllFocus()) { if (_menu->mouseRelease(x, y)) { _sceneDirty = true; _consoleDirty = true; |