[Scummvm-cvs-logs] CVS: scummvm/gui about.cpp,1.36,1.37 about.h,1.14,1.15
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Fri Jun 3 05:08:28 CEST 2005
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29960
Modified Files:
about.cpp about.h
Log Message:
Cleanup.
Index: about.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- about.cpp 17 May 2005 23:41:35 -0000 1.36
+++ about.cpp 3 Jun 2005 12:07:52 -0000 1.37
@@ -80,12 +80,10 @@
int outerBorder;
if (screenW >= 400 && screenH >= 300) {
- _font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
xOff = 8;
yOff = 5;
outerBorder = 80;
} else {
- _font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
xOff = 3;
yOff = 2;
outerBorder = 10;
@@ -94,13 +92,13 @@
_w = screenW - 2 * outerBorder;
_h = screenH - 2 * outerBorder;
- _lineHeight = _font->getFontHeight() + 3;
+ _lineHeight = g_gui.getFontHeight() + 3;
// Heuristic to compute 'optimal' dialog width
int maxW = _w - 2*xOff;
_w = 0;
for (i = 0; i < ARRAYSIZE(credits); i++) {
- int tmp = _font->getStringWidth(credits[i]+5);
+ int tmp = g_gui.getStringWidth(credits[i] + 5);
if ( _w < tmp && tmp <= maxW) {
_w = tmp;
}
@@ -162,7 +160,7 @@
_lines.push_back(format);
} else {
Common::StringList wrappedLines;
- _font->wordWrapText(str, _w - 2*xOff, wrappedLines);
+ g_gui.getFont().wordWrapText(str, _w - 2*xOff, wrappedLines);
for (Common::StringList::const_iterator i = wrappedLines.begin(); i != wrappedLines.end(); ++i) {
_lines.push_back(format + *i);
@@ -255,7 +253,7 @@
while (*str && *str == ' ')
str++;
- _font->drawString(&g_gui.getScreen(), str, _x + xOff, y, _w - 2 * xOff, color, align, 0, false);
+ g_gui.drawString(str, _x + xOff, y, _w - 2 * xOff, color, align, 0, false);
y += _lineHeight;
}
Index: about.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- about.h 2 Jun 2005 12:29:01 -0000 1.14
+++ about.h 3 Jun 2005 12:07:53 -0000 1.15
@@ -25,10 +25,6 @@
#include "common/str.h"
#include "graphics/surface.h"
-namespace Graphics {
- class Font;
-}
-
namespace GUI {
class AboutDialog : public Dialog {
@@ -41,7 +37,6 @@
byte _modifiers;
bool _willClose;
Graphics::Surface _canvas;
- const Graphics::Font *_font;
int xOff, yOff;
More information about the Scummvm-git-logs
mailing list