diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/macgui/mactext.cpp | 10 | ||||
-rw-r--r-- | graphics/macgui/mactext.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index fa0510b544..2ca60a1745 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -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 diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h index 3870451014..526d5266dc 100644 --- a/graphics/macgui/mactext.h +++ b/graphics/macgui/mactext.h @@ -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(); |