mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
LAB: Reorder mouse position check in processMonitor in order to avoid duplicate checks
This commit is contained in:
parent
2cfac1c4b0
commit
e71f28d0ba
@ -435,19 +435,9 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera
|
|||||||
return;
|
return;
|
||||||
else if ((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_LEFTBUTTON & qualifier)) {
|
else if ((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_LEFTBUTTON & qualifier)) {
|
||||||
if ((mouseY >= _utils->vgaScaleY(171)) && (mouseY <= _utils->vgaScaleY(200))) {
|
if ((mouseY >= _utils->vgaScaleY(171)) && (mouseY <= _utils->vgaScaleY(200))) {
|
||||||
if ((mouseX >= _utils->vgaScaleX(259)) && (mouseX <= _utils->vgaScaleX(289))) {
|
if (mouseX <= _utils->vgaScaleX(31)) {
|
||||||
if (!_lastPage) {
|
|
||||||
_monitorPage += 1;
|
|
||||||
drawMonText(ntext, monitorFont, x1, y1, x2, y2, isInteractive);
|
|
||||||
}
|
|
||||||
} else if ((mouseX >= _utils->vgaScaleX(0)) && (mouseX <= _utils->vgaScaleX(31))) {
|
|
||||||
return;
|
return;
|
||||||
} else if ((mouseX >= _utils->vgaScaleX(290)) && (mouseX <= _utils->vgaScaleX(320))) {
|
} else if (mouseX <= _utils->vgaScaleX(59)) {
|
||||||
if (_monitorPage >= 1) {
|
|
||||||
_monitorPage -= 1;
|
|
||||||
drawMonText(ntext, monitorFont, x1, y1, x2, y2, isInteractive);
|
|
||||||
}
|
|
||||||
} else if ((mouseX >= _utils->vgaScaleX(31)) && (mouseX <= _utils->vgaScaleX(59))) {
|
|
||||||
if (isInteractive) {
|
if (isInteractive) {
|
||||||
_monitorPage = 0;
|
_monitorPage = 0;
|
||||||
|
|
||||||
@ -459,6 +449,17 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera
|
|||||||
_monitorPage = 0;
|
_monitorPage = 0;
|
||||||
drawMonText(ntext, monitorFont, x1, y1, x2, y2, isInteractive);
|
drawMonText(ntext, monitorFont, x1, y1, x2, y2, isInteractive);
|
||||||
}
|
}
|
||||||
|
} else if (mouseX < _utils->vgaScaleX(259)) {
|
||||||
|
return;
|
||||||
|
} else if (mouseX <= _utils->vgaScaleX(289)) {
|
||||||
|
if (!_lastPage) {
|
||||||
|
_monitorPage += 1;
|
||||||
|
drawMonText(ntext, monitorFont, x1, y1, x2, y2, isInteractive);
|
||||||
|
}
|
||||||
|
} else if (_monitorPage >= 1) {
|
||||||
|
// mouseX between 290 and 320 (scaled)
|
||||||
|
_monitorPage -= 1;
|
||||||
|
drawMonText(ntext, monitorFont, x1, y1, x2, y2, isInteractive);
|
||||||
}
|
}
|
||||||
} else if (isInteractive) {
|
} else if (isInteractive) {
|
||||||
CloseDataPtr tmpClosePtr = _closeDataPtr;
|
CloseDataPtr tmpClosePtr = _closeDataPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user