aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/mactext.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-02 10:22:29 +0200
committerEugene Sandulenko2017-08-04 21:54:19 +0200
commite236db8c3fc37bd9326f88e4fad7ac57454c70bf (patch)
treed61f97546ec186940c1c81d329d856dfbdc34071 /graphics/macgui/mactext.cpp
parent2e458671f6317a2a8195b9a328cf796add5d81fd (diff)
downloadscummvm-rg350-e236db8c3fc37bd9326f88e4fad7ac57454c70bf.tar.gz
scummvm-rg350-e236db8c3fc37bd9326f88e4fad7ac57454c70bf.tar.bz2
scummvm-rg350-e236db8c3fc37bd9326f88e4fad7ac57454c70bf.zip
GRAPHICS: MACGUI: Fixed appendText() in MacGui: formatting was not passed
Diffstat (limited to 'graphics/macgui/mactext.cpp')
-rw-r--r--graphics/macgui/mactext.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 59e7d67634..3c410f6529 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -380,30 +380,34 @@ void MacText::appendText(Common::String str, int fontId = kMacFontChicago, int f
MacFontRun fontRun = MacFontRun(_wm, fontId, fontSlant, fontSize, 0, 0, 0);
+ _currentFormatting = fontRun;
+
_str += fontRun.toString();
_str += str;
- resizeAndFormatLines(newLines, &fontRun);
+ //resizeAndFormatLines(newLines, &fontRun);
splitString(str);
recalcDims();
- render(oldLen, _textLines.size());
+ render(oldLen - 1, _textLines.size());
}
void MacText::appendTextDefault(Common::String str) {
uint oldLen = _textLines.size();
uint newLines = 1 + getNewlinesInString(str);
+ _currentFormatting = _defaultFormatting;
+
_str += _defaultFormatting.toString();
_str += str;
- resizeAndFormatLines(newLines, &_defaultFormatting);
+ //resizeAndFormatLines(newLines, &_defaultFormatting);
splitString(str);
recalcDims();
- render(oldLen, _textLines.size());
+ render(oldLen - 1, _textLines.size());
}
void MacText::clearText() {