From 9cb7535e6df646f3989c58bed8e327f5e765a56a Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 5 Jan 2016 22:05:23 +0100 Subject: LAB: Ignore clicks in empty region in monitor Regression from e71f28d0ba319bca35056b7e88d8ebfe0ea92017 --- engines/lab/special.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines') 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); } -- cgit v1.2.3