diff options
Diffstat (limited to 'gui/GuiManager.cpp')
-rw-r--r-- | gui/GuiManager.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index ca1fdef41c..b97a62109b 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -273,8 +273,8 @@ void GuiManager::runLoop() { lastRedraw = _system->getMillis(); } - Common::Event Event; - while (eventMan->pollEvent(Event)) { + Common::Event event; + while (eventMan->pollEvent(event)) { // The top dialog can change during the event loop. In that case, flush all the // dialog-related events since they were probably generated while the old dialog @@ -282,10 +282,10 @@ void GuiManager::runLoop() { // // This hopefully fixes strange behaviour/crashes with pop-up widgets. (Most easily // triggered in 3x mode or when running ScummVM under Valgrind.) - if (activeDialog != getTopDialog() && Event.type != Common::EVENT_SCREEN_CHANGED) + if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED) continue; - Common::Point mouse(Event.mouse.x - activeDialog->_x, Event.mouse.y - activeDialog->_y); + Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y); if (lastRedraw + waitTime < _system->getMillis()) { _theme->updateScreen(); @@ -293,12 +293,12 @@ void GuiManager::runLoop() { lastRedraw = _system->getMillis(); } - switch (Event.type) { + switch (event.type) { case Common::EVENT_KEYDOWN: - activeDialog->handleKeyDown(Event.kbd); + activeDialog->handleKeyDown(event.kbd); break; case Common::EVENT_KEYUP: - activeDialog->handleKeyUp(Event.kbd); + activeDialog->handleKeyUp(event.kbd); break; case Common::EVENT_MOUSEMOVE: activeDialog->handleMouseMoved(mouse.x, mouse.y, 0); @@ -306,15 +306,15 @@ void GuiManager::runLoop() { // We don't distinguish between mousebuttons (for now at least) case Common::EVENT_LBUTTONDOWN: case Common::EVENT_RBUTTONDOWN: - button = (Event.type == Common::EVENT_LBUTTONDOWN ? 1 : 2); + button = (event.type == Common::EVENT_LBUTTONDOWN ? 1 : 2); time = _system->getMillis(); if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay) - && ABS(_lastClick.x - Event.mouse.x) < 3 - && ABS(_lastClick.y - Event.mouse.y) < 3) { + && ABS(_lastClick.x - event.mouse.x) < 3 + && ABS(_lastClick.y - event.mouse.y) < 3) { _lastClick.count++; } else { - _lastClick.x = Event.mouse.x; - _lastClick.y = Event.mouse.y; + _lastClick.x = event.mouse.x; + _lastClick.y = event.mouse.y; _lastClick.count = 1; } _lastClick.time = time; @@ -322,7 +322,7 @@ void GuiManager::runLoop() { break; case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONUP: - button = (Event.type == Common::EVENT_LBUTTONUP ? 1 : 2); + button = (event.type == Common::EVENT_LBUTTONUP ? 1 : 2); activeDialog->handleMouseUp(mouse.x, mouse.y, button, _lastClick.count); break; case Common::EVENT_WHEELUP: |