mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
GRAPHICS: Implemented MacText::replaceLastLine()
This commit is contained in:
parent
a1236d5782
commit
57864f5e6c
@ -144,4 +144,15 @@ void MacText::appendText(Common::String str) {
|
||||
render(oldLen + 1, _text.size());
|
||||
}
|
||||
|
||||
void MacText::replaceLastLine(Common::String str) {
|
||||
int oldLen = MAX<int>(0, _text.size() - 1);
|
||||
|
||||
if (_text.size())
|
||||
_text.pop_back();
|
||||
|
||||
splitString(str);
|
||||
|
||||
render(oldLen, _text.size());
|
||||
}
|
||||
|
||||
} // End of namespace Graphics
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
|
||||
void draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff);
|
||||
void appendText(Common::String str);
|
||||
|
||||
void replaceLastLine(Common::String str);
|
||||
|
||||
private:
|
||||
void splitString(Common::String &s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user