aboutsummaryrefslogtreecommitdiff
path: root/gui/about.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-06-03 12:07:53 +0000
committerTorbjörn Andersson2005-06-03 12:07:53 +0000
commit3772bb9873d327e93865a764ebef28c07cdaf655 (patch)
tree4713f2d65e9ad6fba3d2880424f73f0b1c910f9f /gui/about.cpp
parent64083773377630442fd1d43d3882fde0c3d066e4 (diff)
downloadscummvm-rg350-3772bb9873d327e93865a764ebef28c07cdaf655.tar.gz
scummvm-rg350-3772bb9873d327e93865a764ebef28c07cdaf655.tar.bz2
scummvm-rg350-3772bb9873d327e93865a764ebef28c07cdaf655.zip
Cleanup.
svn-id: r18321
Diffstat (limited to 'gui/about.cpp')
-rw-r--r--gui/about.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/gui/about.cpp b/gui/about.cpp
index 6637e38f9f..7de54fccf1 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -80,12 +80,10 @@ AboutDialog::AboutDialog()
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 @@ AboutDialog::AboutDialog()
_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 @@ void AboutDialog::addLine(const char *str) {
_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 @@ void AboutDialog::drawDialog() {
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;
}