diff options
author | Eugene Sandulenko | 2016-03-18 16:49:41 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-03-20 17:38:23 +0100 |
commit | f6c3363cf54af1c01efc12a98ab27a8af52aad3e (patch) | |
tree | 2199e0d08497a4acd8168a4aaf2bcf83ffdadd67 /engines/wage/gui.cpp | |
parent | 40faac84195743e1eb2fef9c55920fac94909c4e (diff) | |
download | scummvm-rg350-f6c3363cf54af1c01efc12a98ab27a8af52aad3e.tar.gz scummvm-rg350-f6c3363cf54af1c01efc12a98ab27a8af52aad3e.tar.bz2 scummvm-rg350-f6c3363cf54af1c01efc12a98ab27a8af52aad3e.zip |
WAGE: Adjust cursor position when scrolling
Diffstat (limited to 'engines/wage/gui.cpp')
-rw-r--r-- | engines/wage/gui.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index db1935022c..9dd1a24b3c 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -588,15 +588,20 @@ Designed *Gui::mouseUp(int x, int y) { } } else if ((borderClick = isInBorder(_consoleTextArea, x, y)) != kBorderNone) { _bordersDirty = true; + int _oldScrollPos = _scrollPos; switch (borderClick) { case kBorderScrollUp: _scrollPos = MAX<int>(0, _scrollPos - _consoleLineHeight); + undrawCursor(); + _cursorY -= (_scrollPos - _oldScrollPos); _consoleDirty = true; _consoleFullRedraw = true; break; case kBorderScrollDown: _scrollPos = MIN<int>((_lines.size() - 2) * _consoleLineHeight, _scrollPos + _consoleLineHeight); + undrawCursor(); + _cursorY -= (_scrollPos - _oldScrollPos); _consoleDirty = true; _consoleFullRedraw = true; break; |