aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-03-18 16:46:54 +0100
committerEugene Sandulenko2016-03-20 17:38:23 +0100
commit40faac84195743e1eb2fef9c55920fac94909c4e (patch)
treec7e3b4f9852db114348314d14b89666c844c702f /engines/wage
parenteec95957bf499b5e7d7bea46c1ca112b533a2bfa (diff)
downloadscummvm-rg350-40faac84195743e1eb2fef9c55920fac94909c4e.tar.gz
scummvm-rg350-40faac84195743e1eb2fef9c55920fac94909c4e.tar.bz2
scummvm-rg350-40faac84195743e1eb2fef9c55920fac94909c4e.zip
WAGE: Restrict text scrolling to the visible text
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 4af5bea97e..db1935022c 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -591,12 +591,14 @@ Designed *Gui::mouseUp(int x, int y) {
switch (borderClick) {
case kBorderScrollUp:
- _scrollPos--;
+ _scrollPos = MAX<int>(0, _scrollPos - _consoleLineHeight);
_consoleDirty = true;
+ _consoleFullRedraw = true;
break;
case kBorderScrollDown:
- _scrollPos++;
+ _scrollPos = MIN<int>((_lines.size() - 2) * _consoleLineHeight, _scrollPos + _consoleLineHeight);
_consoleDirty = true;
+ _consoleFullRedraw = true;
break;
}
}