[Scummvm-cvs-logs] CVS: scummvm/gui about.cpp,1.32,1.33
Max Horn
fingolfin at users.sourceforge.net
Sun May 15 09:20:48 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/graphics font.cpp,1.9,1.10 font.h,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm/gui message.h,1.16,1.17 message.cpp,1.24,1.25 about.cpp,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13676
Modified Files:
about.cpp
Log Message:
Word wrap the 'features' string
Index: about.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- about.cpp 11 May 2005 19:31:23 -0000 1.32
+++ about.cpp 15 May 2005 16:19:43 -0000 1.33
@@ -110,9 +110,19 @@
date += ')';
_lines.push_back(date);
- Common::String features("\\C\\c2""Supports: ");
+ Common::String features("Supports: ");
features += gScummVMFeatures;
- _lines.push_back(features);
+
+ // If the features string is too wide, split it up
+ const int maxWidth = _w - 2*kXOff;
+ if (_font->getStringWidth(features) > maxWidth) {
+ Common::StringList wrappedLines;
+ _font->wordWrapText(features, maxWidth, wrappedLines);
+
+ for (i = 0; i < (int)wrappedLines.size(); ++i)
+ _lines.push_back("\\C\\c2" + wrappedLines[i]);
+ } else
+ _lines.push_back("\\C\\c2" + features);
_lines.push_back("");
@@ -207,7 +217,7 @@
while (*str && *str == ' ')
str++;
- _font->drawString(&g_gui.getScreen(), str, _x + kXOff, y, _w - 2 * kXOff, color, align);
+ _font->drawString(&g_gui.getScreen(), str, _x + kXOff, y, _w - 2 * kXOff, color, align, 0, false);
y += _lineHeight;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/graphics font.cpp,1.9,1.10 font.h,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm/gui message.h,1.16,1.17 message.cpp,1.24,1.25 about.cpp,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list