diff options
author | Eugene Sandulenko | 2017-07-30 08:52:52 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-01 10:42:21 +0200 |
commit | 68cd5c8868ade8ebfd331e4fea25d47fe899dc42 (patch) | |
tree | ab298fcbf03c1ca015e29bfbbb58e3e4c8af19a4 /graphics/macgui/mactext.cpp | |
parent | 6443bee147a1f5a5fd969d1e59695e13e9f79fb6 (diff) | |
download | scummvm-rg350-68cd5c8868ade8ebfd331e4fea25d47fe899dc42.tar.gz scummvm-rg350-68cd5c8868ade8ebfd331e4fea25d47fe899dc42.tar.bz2 scummvm-rg350-68cd5c8868ade8ebfd331e4fea25d47fe899dc42.zip |
GRAPHICS: MACGUI: Added method to remove last line from MacText
Diffstat (limited to 'graphics/macgui/mactext.cpp')
-rw-r--r-- | graphics/macgui/mactext.cpp | 10 |
1 files changed, 10 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 |