mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 00:45:10 +00:00
Added word wrapping to the status line (necessary when giving long sets of Tell instructions)
svn-id: r23809
This commit is contained in:
parent
1ba14890c6
commit
e0d2b0764f
@ -441,7 +441,18 @@ void Room::update() {
|
||||
if (_hotspotId != 0)
|
||||
s.writeString(0, 0, _hotspotName, false, DIALOG_TEXT_COLOUR);
|
||||
} else {
|
||||
s.writeString(0, 0, _statusLine, false, DIALOG_WHITE_COLOUR);
|
||||
// Word wrap (if necessary) the status line and dispaly it
|
||||
char *statusLineCopy = strdup(_statusLine);
|
||||
char **lines;
|
||||
uint8 numLines;
|
||||
int16 yPos = 0;
|
||||
s.wordWrap(statusLineCopy, s.width(), lines, numLines);
|
||||
for (int lineNum = 0; lineNum < numLines; ++lineNum) {
|
||||
s.writeString(0, yPos, lines[lineNum], false, DIALOG_WHITE_COLOUR);
|
||||
yPos += FONT_HEIGHT;
|
||||
}
|
||||
Memory::dealloc(lines);
|
||||
Memory::dealloc(statusLineCopy);
|
||||
}
|
||||
|
||||
// If show information is turned on, show extra debugging information
|
||||
|
Loading…
x
Reference in New Issue
Block a user