[Scummvm-git-logs] scummvm master -> 86d1b1b050a6af5583fb56ad4126d88ea66d3ec7
sev-
sev at scummvm.org
Sun Aug 6 11:35:46 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
86d1b1b050 GRAPHICS: MACGUI: Fix cursor position when MacTextWindow is scrolled
Commit: 86d1b1b050a6af5583fb56ad4126d88ea66d3ec7
https://github.com/scummvm/scummvm/commit/86d1b1b050a6af5583fb56ad4126d88ea66d3ec7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-06T11:23:23+02:00
Commit Message:
GRAPHICS: MACGUI: Fix cursor position when MacTextWindow is scrolled
Changed paths:
graphics/macgui/mactextwindow.cpp
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index ffb72d9..854675d 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;
}
More information about the Scummvm-git-logs
mailing list