[Scummvm-git-logs] scummvm master -> 57864f5e6c44bdecaeecfba8e0754e1d19f3cb96
sev-
sev at scummvm.org
Thu Dec 22 18:17:11 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
57864f5e6c GRAPHICS: Implemented MacText::replaceLastLine()
Commit: 57864f5e6c44bdecaeecfba8e0754e1d19f3cb96
https://github.com/scummvm/scummvm/commit/57864f5e6c44bdecaeecfba8e0754e1d19f3cb96
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-22T18:16:54+01:00
Commit Message:
GRAPHICS: Implemented MacText::replaceLastLine()
Changed paths:
graphics/macgui/mactext.cpp
graphics/macgui/mactext.h
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 2af31a9..0635445 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -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
diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h
index 37fc125..e035eb1 100644
--- a/graphics/macgui/mactext.h
+++ b/graphics/macgui/mactext.h
@@ -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);
More information about the Scummvm-git-logs
mailing list