diff options
author | Max Horn | 2007-03-17 19:02:05 +0000 |
---|---|---|
committer | Max Horn | 2007-03-17 19:02:05 +0000 |
commit | ed54ea9155961d8ca5d5fb3c7777fc57a29f2751 (patch) | |
tree | 467b926af11cd4129ba003d04ba01de044c7a6df /gui/newgui.cpp | |
parent | f272d1957084098c5b53975ad3501074f6971af8 (diff) | |
download | scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.gz scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.bz2 scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.zip |
Moved Event/EventType/keyboard enum from common/system.h (part of class OSystem) to common/events.h (part of namespace Common). Porters may have to make minor changes to their backends to get them to compile again
svn-id: r26180
Diffstat (limited to 'gui/newgui.cpp')
-rw-r--r-- | gui/newgui.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp index adb27b83df..6d153a6b77 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -242,11 +242,11 @@ void NewGui::runLoop() { _theme->drawAll(); _system->updateScreen(); - OSystem::Event event; + Common::Event event; uint32 time = _system->getMillis(); while (eventMan->pollEvent(event)) { - if (activeDialog != getTopDialog() && event.type != OSystem::EVENT_QUIT && event.type != OSystem::EVENT_SCREEN_CHANGED) + if (activeDialog != getTopDialog() && event.type != Common::EVENT_QUIT && event.type != Common::EVENT_SCREEN_CHANGED) continue; Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y); @@ -266,19 +266,19 @@ void NewGui::runLoop() { } switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: activeDialog->handleKeyDown(event.kbd.ascii, event.kbd.keycode, event.kbd.flags); break; - case OSystem::EVENT_KEYUP: + case Common::EVENT_KEYUP: activeDialog->handleKeyUp(event.kbd.ascii, event.kbd.keycode, event.kbd.flags); break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: activeDialog->handleMouseMoved(mouse.x, mouse.y, 0); break; // We don't distinguish between mousebuttons (for now at least) - case OSystem::EVENT_LBUTTONDOWN: - case OSystem::EVENT_RBUTTONDOWN: - button = (event.type == OSystem::EVENT_LBUTTONDOWN ? 1 : 2); + case Common::EVENT_LBUTTONDOWN: + case Common::EVENT_RBUTTONDOWN: + button = (event.type == Common::EVENT_LBUTTONDOWN ? 1 : 2); if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay) && ABS(_lastClick.x - event.mouse.x) < 3 && ABS(_lastClick.y - event.mouse.y) < 3) { @@ -291,21 +291,21 @@ void NewGui::runLoop() { _lastClick.time = time; activeDialog->handleMouseDown(mouse.x, mouse.y, button, _lastClick.count); break; - case OSystem::EVENT_LBUTTONUP: - case OSystem::EVENT_RBUTTONUP: - button = (event.type == OSystem::EVENT_LBUTTONUP ? 1 : 2); + case Common::EVENT_LBUTTONUP: + case Common::EVENT_RBUTTONUP: + button = (event.type == Common::EVENT_LBUTTONUP ? 1 : 2); activeDialog->handleMouseUp(mouse.x, mouse.y, button, _lastClick.count); break; - case OSystem::EVENT_WHEELUP: + case Common::EVENT_WHEELUP: activeDialog->handleMouseWheel(mouse.x, mouse.y, -1); break; - case OSystem::EVENT_WHEELDOWN: + case Common::EVENT_WHEELDOWN: activeDialog->handleMouseWheel(mouse.x, mouse.y, 1); break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: _system->quit(); return; - case OSystem::EVENT_SCREEN_CHANGED: + case Common::EVENT_SCREEN_CHANGED: screenChange(); break; } |