GRAPHICS: MACGUI: Added method to remove last line from MacText

This commit is contained in:
Eugene Sandulenko 2017-07-30 08:52:52 +02:00
parent 6443bee147
commit 68cd5c8868
2 changed files with 11 additions and 0 deletions

View File

@ -410,4 +410,14 @@ void MacText::replaceLastLine(Common::String str) {
render(oldLen, _textLines.size());
}
void MacText::removeLastLine() {
if (!_textLines.size())
return;
int h = getLineHeight(_textLines.size() - 1) + _interLinear;
_textLines.pop_back();
_textMaxHeight -= h;
}
} // End of namespace Graphics

View File

@ -101,6 +101,7 @@ public:
void appendTextDefault(Common::String str);
void clearText();
void replaceLastLine(Common::String str);
void removeLastLine();
int getLineCount() { return _textLines.size(); }
void render();