[Scummvm-git-logs] scummvm master -> a1c8ed14095162210ff85f3ac575622a9d3a28b0
moralrecordings
noreply at scummvm.org
Fri May 30 09:47:13 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
a1c8ed1409 MACTEXT: Fix clicking on links in helpmenu
Commit: a1c8ed14095162210ff85f3ac575622a9d3a28b0
https://github.com/scummvm/scummvm/commit/a1c8ed14095162210ff85f3ac575622a9d3a28b0
Author: Åukasz Lenkiewicz (lukasz at lenkiewicz.xyz)
Date: 2025-05-30T17:47:10+08:00
Commit Message:
MACTEXT: Fix clicking on links in helpmenu
Recent change replaced getRowCol in MacText::getMouseLink with getLineCharacter.
This commits reverts it because getLineCharacter counts lines by paragraph not
by rendered rows, which causes issues with clicking on links in help menu due to
long text in said menu.
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index a85f1944476..321b262b88b 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -384,7 +384,7 @@ void MacText::setMaxWidth(int maxWidth) {
absoluteCharOffset -= lineWidth;
++_cursorRow;
}
-
+
int ppos = 0;
if (absoluteCharOffset > _canvas.getLineCharWidth(_cursorRow, true))
ppos = _canvas.getLineCharWidth(_cursorRow, true);
@@ -1718,7 +1718,7 @@ Common::U32String MacText::getMouseLink(int x, int y) {
y += _scrollPos;
int row, chunk;
- getLineCharacter(x, y, nullptr, nullptr, &row, nullptr, &chunk);
+ getRowCol(x, y, nullptr, nullptr, &row, nullptr, &chunk);
if (chunk < 0)
return Common::U32String();
More information about the Scummvm-git-logs
mailing list