aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-27 00:47:21 +0200
committerFilippos Karapetis2015-12-27 00:47:21 +0200
commit1d3a3a24fac86e184da2ef44deb1491d347f5f8d (patch)
tree24a5abb96e5ef9d76038898877cf2ef9e9ae1e60
parent55f236f6ffd6dd253712c1cfc8cd60d09d03bff7 (diff)
downloadscummvm-rg350-1d3a3a24fac86e184da2ef44deb1491d347f5f8d.tar.gz
scummvm-rg350-1d3a3a24fac86e184da2ef44deb1491d347f5f8d.tar.bz2
scummvm-rg350-1d3a3a24fac86e184da2ef44deb1491d347f5f8d.zip
LAB: Fix regression in the tab handling code
-rw-r--r--engines/lab/engine.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 4b390732ab..325d8f6272 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -554,8 +554,7 @@ bool LabEngine::processEvent(MessageClass tmpClass, uint16 code, uint16 qualifie
return false;
if (msgClass == kMessageRawKey && !_graphics->_longWinInFront) {
- if (!processKey(curMsg, msgClass, qualifier, curPos, curInv, forceDraw, code))
- return false;
+ return processKey(curMsg, msgClass, qualifier, curPos, curInv, forceDraw, code);
} else if ((msgClass == kMessageRawKey || leftButtonClick || rightButtonClick) && _graphics->_longWinInFront) {
_graphics->_longWinInFront = false;
_graphics->drawPanel();
@@ -599,14 +598,6 @@ bool LabEngine::processEvent(MessageClass tmpClass, uint16 code, uint16 qualifie
mayShowCrumbIndicator();
_graphics->screenUpdate();
- } else if (code == Common::KEYCODE_TAB) {
- const CloseData *tmpClosePtr = _closeDataPtr;
-
- // get next close-up in list after the one pointed to by curPos
- setCurrentClose(curPos, &tmpClosePtr, true, true);
-
- if (tmpClosePtr != _closeDataPtr)
- _event->setMousePos(Common::Point(_utils->scaleX((tmpClosePtr->_x1 + tmpClosePtr->_x2) / 2), _utils->scaleY((tmpClosePtr->_y1 + tmpClosePtr->_y2) / 2)));
}
return true;
@@ -681,8 +672,17 @@ bool LabEngine::processKey(IntuiMessage *curMsg, uint32 msgClass, uint16 &qualif
forceDraw = true;
interfaceOn();
- } else if (code == Common::KEYCODE_ESCAPE)
+ } else if (code == Common::KEYCODE_ESCAPE) {
_closeDataPtr = nullptr;
+ } else if (code == Common::KEYCODE_TAB) {
+ const CloseData *tmpClosePtr = _closeDataPtr;
+
+ // get next close-up in list after the one pointed to by curPos
+ setCurrentClose(curPos, &tmpClosePtr, true, true);
+
+ if (tmpClosePtr != _closeDataPtr)
+ _event->setMousePos(Common::Point(_utils->scaleX((tmpClosePtr->_x1 + tmpClosePtr->_x2) / 2), _utils->scaleY((tmpClosePtr->_y1 + tmpClosePtr->_y2) / 2)));
+ }
eatMessages();