diff options
author | Eugene Sandulenko | 2016-04-25 19:54:26 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-04-25 19:54:26 +0200 |
commit | 98061bdc4c802f9e025f4047bc7d24186365b75d (patch) | |
tree | 8fe4cdcc656f12f5236c8347d4d381d066cff195 /engines/wage/gui.cpp | |
parent | df6ee166311e47e77d2b50aee87e233412f6d23a (diff) | |
download | scummvm-rg350-98061bdc4c802f9e025f4047bc7d24186365b75d.tar.gz scummvm-rg350-98061bdc4c802f9e025f4047bc7d24186365b75d.tar.bz2 scummvm-rg350-98061bdc4c802f9e025f4047bc7d24186365b75d.zip |
WAGE: Move menu event processing to WindowManager
Diffstat (limited to 'engines/wage/gui.cpp')
-rw-r--r-- | engines/wage/gui.cpp | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 92002fff5a..6fcbbc3678 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -474,15 +474,6 @@ void Gui::processMenuShortCut(byte flags, uint16 ascii) { _menu->processMenuShortCut(flags, ascii); } -void Gui::mouseMove(int x, int y) { - if (_menu->hasAllFocus()) { - if (_menu->mouseMove(x, y)) - _menu->setDirty(true); - - return; - } -} - void Gui::pushArrowCursor() { CursorMan.pushCursor(macCursorArrow, 11, 16, 1, 1, 3); } @@ -492,38 +483,7 @@ void Gui::popCursor() { } bool Gui::processEvent(Common::Event &event) { - if (_wm.processEvent(event)) - return true; - - switch (event.type) { - case Common::EVENT_MOUSEMOVE: - mouseMove(event.mouse.x, event.mouse.y); - break; - case Common::EVENT_LBUTTONDOWN: - mouseDown(event.mouse.x, event.mouse.y); - break; - case Common::EVENT_LBUTTONUP: - mouseUp(event.mouse.x, event.mouse.y); - break; - - default: - return false; - } - - return true; -} - -void Gui::mouseUp(int x, int y) { - if (_menu->hasAllFocus()) - _menu->mouseRelease(x, y); - - return; -} - -void Gui::mouseDown(int x, int y) { - if (_menu->mouseClick(x, y)) { - _menu->setDirty(true); - } + return _wm.processEvent(event); } int Gui::calcTextX(int x, int textLine) { |