diff options
author | Willem Jan Palenstijn | 2016-01-05 22:05:23 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2016-01-05 22:05:23 +0100 |
commit | 9cb7535e6df646f3989c58bed8e327f5e765a56a (patch) | |
tree | 2b0c0c2553c5e6b455a9e033357cca7774853347 /engines/lab | |
parent | b72c02bad44749a1355acefdb198e36b2e772575 (diff) | |
download | scummvm-rg350-9cb7535e6df646f3989c58bed8e327f5e765a56a.tar.gz scummvm-rg350-9cb7535e6df646f3989c58bed8e327f5e765a56a.tar.bz2 scummvm-rg350-9cb7535e6df646f3989c58bed8e327f5e765a56a.zip |
LAB: Ignore clicks in empty region in monitor
Regression from e71f28d0ba319bca35056b7e88d8ebfe0ea92017
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/special.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 43d6056125..6613b384b7 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -387,11 +387,15 @@ void LabEngine::processMonitor(const char *ntext, TextFont *monitorFont, bool is int16 mouseX = msg->_mouse.x; int16 mouseY = msg->_mouse.y; + // Check if mouse was in button bar if ((mouseY >= _utils->vgaScaleY(171)) && (mouseY <= _utils->vgaScaleY(200))) { - if (mouseX <= _utils->vgaScaleX(31)) + if (mouseX <= _utils->vgaScaleX(31)) { + // Exit button return; + } if (mouseX <= _utils->vgaScaleX(59)) { + // Back button if (isInteractive) { _monitorPage = 0; @@ -404,14 +408,15 @@ void LabEngine::processMonitor(const char *ntext, TextFont *monitorFont, bool is drawMonText(ntext, monitorFont, textRect, isInteractive); } } else if (mouseX < _utils->vgaScaleX(259)) { - return; + // empty region; ignore } else if (mouseX <= _utils->vgaScaleX(289)) { + // Page down button if (!_lastPage) { _monitorPage += 1; drawMonText(ntext, monitorFont, textRect, isInteractive); } } else if (_monitorPage >= 1) { - // mouseX is greater than 290 (scaled) + // Page up button _monitorPage -= 1; drawMonText(ntext, monitorFont, textRect, isInteractive); } |