aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-06 11:23:23 +0200
committerEugene Sandulenko2017-08-06 11:23:23 +0200
commit86d1b1b050a6af5583fb56ad4126d88ea66d3ec7 (patch)
treede83ceae0edf2d9845723b3145f38d431113ea54
parentbbd9247eb8982af130021c2f44dc157eee4b282c (diff)
downloadscummvm-rg350-86d1b1b050a6af5583fb56ad4126d88ea66d3ec7.tar.gz
scummvm-rg350-86d1b1b050a6af5583fb56ad4126d88ea66d3ec7.tar.bz2
scummvm-rg350-86d1b1b050a6af5583fb56ad4126d88ea66d3ec7.zip
GRAPHICS: MACGUI: Fix cursor position when MacTextWindow is scrolled
-rw-r--r--graphics/macgui/mactextwindow.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index ffb72d9876..854675de98 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -142,7 +142,7 @@ bool MacTextWindow::draw(ManagedSurface *g, bool forceRedraw) {
_mactext->draw(&_composeSurface, 0, _scrollPos, _surface.w - 2, _scrollPos + _surface.h - 2, kConWOverlap - 2, kConWOverlap - 2);
if (_cursorState)
- _composeSurface.blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX + kConWOverlap, _cursorY + kConHOverlap));
+ _composeSurface.blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX + kConWOverlap - 2, _cursorY + kConHOverlap - 2));
if (_selectedText.endY != -1)
drawSelection();
@@ -421,10 +421,7 @@ static void cursorTimerHandler(void *refCon) {
}
void MacTextWindow::updateCursorPos() {
- if (_scrollPos)
- _cursorY = _mactext->getTextHeight() - kCursorHeight * 2;
- else
- _cursorY = _mactext->getTextHeight() - kCursorHeight - 2;
+ _cursorY = _mactext->getTextHeight() - _scrollPos - kCursorHeight;
_cursorDirty = true;
}