GRAPHICS: Fix MacText wrapping when formatting starts in the middle of a line
This commit is contained in:
parent
7ebc284d3c
commit
c832865875
1 changed files with 1 additions and 8 deletions
|
@ -85,7 +85,7 @@ void MacText::splitString(Common::String &str) {
|
||||||
for (uint j = 0; j < _textLines[i].chunks.size(); j++)
|
for (uint j = 0; j < _textLines[i].chunks.size(); j++)
|
||||||
debugN(7, "[%d] \"%s\"", _textLines[i].chunks[j].fontId, _textLines[i].chunks[j].text.c_str());
|
debugN(7, "[%d] \"%s\"", _textLines[i].chunks[j].fontId, _textLines[i].chunks[j].text.c_str());
|
||||||
|
|
||||||
debug(7, " --> %c %d", (*s > 0x20 ? *s : ' '), (byte)*s);
|
debug(7, " --> %c %d, '%s'", (*s > 0x20 ? *s : ' '), (byte)*s, tmp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s == '\001') {
|
if (*s == '\001') {
|
||||||
|
@ -109,13 +109,6 @@ void MacText::splitString(Common::String &str) {
|
||||||
|
|
||||||
_currentFormatting.setValues(_wm, fontId, textSlant, unk3f, fontSize, palinfo1, palinfo2, palinfo3);
|
_currentFormatting.setValues(_wm, fontId, textSlant, unk3f, fontSize, palinfo1, palinfo2, palinfo3);
|
||||||
|
|
||||||
if (curLine == 0 && curChunk == 0 && _textLines[curLine].chunks[curChunk].text.empty()) {
|
|
||||||
_textLines[curLine].chunks[curChunk] = _currentFormatting;
|
|
||||||
} else {
|
|
||||||
_textLines[curLine].chunks.push_back(_currentFormatting);
|
|
||||||
curChunk++;
|
|
||||||
}
|
|
||||||
|
|
||||||
nextChunk = true;
|
nextChunk = true;
|
||||||
}
|
}
|
||||||
} else if (*s == '\n' && prevCR) { // trean \r\n as one
|
} else if (*s == '\n' && prevCR) { // trean \r\n as one
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue