[Scummvm-git-logs] scummvm master -> 815c8aa6dff169d79003c8a1ed1e1278251e180b

sev- noreply at scummvm.org
Tue Sep 26 21:40:28 UTC 2023


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:
815c8aa6df GRAPHICS: MACGUI: Fix bullet lists indentation


Commit: 815c8aa6dff169d79003c8a1ed1e1278251e180b
    https://github.com/scummvm/scummvm/commit/815c8aa6dff169d79003c8a1ed1e1278251e180b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-09-26T23:40:00+02:00

Commit Message:
GRAPHICS: MACGUI: Fix bullet lists indentation

Changed paths:
    graphics/macgui/mactext.cpp
    graphics/macgui/mactext.h


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 30ce9bca58f..f12d23faaa6 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -566,7 +566,7 @@ void MacText::setDefaultFormatting(uint16 fontId, byte textSlant, uint16 fontSiz
 // Adds the given string to the end of the last line/chunk
 // while observing the _maxWidth and keeping this chunk's
 // formatting
-void MacText::chopChunk(const Common::U32String &str, int *curLinePtr) {
+void MacText::chopChunk(const Common::U32String &str, int *curLinePtr, int indent) {
 	int curLine = *curLinePtr;
 	int curChunk;
 	MacFontRun *chunk;
@@ -632,6 +632,7 @@ void MacText::chopChunk(const Common::U32String &str, int *curLinePtr) {
 			curLine++;
 			_textLines.insert_at(curLine, MacTextLine());
 			_textLines[curLine].chunks.push_back(newchunk);
+			_textLines[curLine].indent = indent;
 		} else {
 			_textLines[curLine].table->back().cells.back().text.push_back(MacTextLine());
 			_textLines[curLine].table->back().cells.back().text.back().chunks.push_back(newchunk);
@@ -724,7 +725,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
 
 			// Okay, now we are either at the end of the line, or in the next
 			// chunk definition. That means, that we have to store the previous chunk
-			chopChunk(tmp, &curLine);
+			chopChunk(tmp, &curLine, indentSize);
 
 			curTextLine = &_textLines[curLine];
 
diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h
index 48c4bc84896..9cb02cb8757 100644
--- a/graphics/macgui/mactext.h
+++ b/graphics/macgui/mactext.h
@@ -345,7 +345,7 @@ private:
 	 */
 	void reshuffleParagraph(int *row, int *col);
 
-	void chopChunk(const Common::U32String &str, int *curLine);
+	void chopChunk(const Common::U32String &str, int *curLine, int indent);
 	void splitString(const Common::U32String &str, int curLine = -1);
 	void render(int from, int to, int shadow);
 	void render(int from, int to);




More information about the Scummvm-git-logs mailing list