aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2006-10-08 11:03:46 +0000
committerJohannes Schickel2006-10-08 11:03:46 +0000
commit9c88c9d9edde324f7ff1e7792447cb667df78d4e (patch)
tree1f2e781658c719fd485f0409862098489cc7c860 /gui
parent5e5a221b0eba9dac64b81dbabfb613c19ddb7045 (diff)
downloadscummvm-rg350-9c88c9d9edde324f7ff1e7792447cb667df78d4e.tar.gz
scummvm-rg350-9c88c9d9edde324f7ff1e7792447cb667df78d4e.tar.bz2
scummvm-rg350-9c88c9d9edde324f7ff1e7792447cb667df78d4e.zip
Ooops. making the classic theme working without a config again.
svn-id: r24200
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeClassic.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp
index b4353c9f28..0c06cd396e 100644
--- a/gui/ThemeClassic.cpp
+++ b/gui/ThemeClassic.cpp
@@ -30,6 +30,7 @@ ThemeClassic::ThemeClassic(OSystem *system) : Theme() {
_system = system;
_initOk = false;
_font = 0;
+ _fontName.clear();
memset(&_screen, 0, sizeof(_screen));
#ifndef CT_NO_TRANSPARENCY
memset(&_dialog, 0, sizeof(_dialog));
@@ -64,7 +65,7 @@ bool ThemeClassic::init() {
_shadowcolor = _system->RGBToColor(_colors[kShadowColor][0], _colors[kShadowColor][1], _colors[kShadowColor][2]);
_textcolor = _system->RGBToColor(_colors[kTextColor][0], _colors[kTextColor][1], _colors[kTextColor][2]);
_textcolorhi = _system->RGBToColor(_colors[kTextColorHi][0], _colors[kTextColorHi][1], _colors[kTextColorHi][2]);
- if (_fontName == "builtin") {
+ if (_fontName.empty()) {
if (_screen.w >= 400 && _screen.h >= 300) {
_font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
} else {
@@ -663,12 +664,12 @@ bool ThemeClassic::loadConfig() {
temp.clear();
temp = _evaluator->getStringVar("font");
- if (temp.empty() || temp.compareToIgnoreCase("builtin")) {
- if (_fontName != "builtin")
+ if (temp.empty() || 0 == temp.compareToIgnoreCase("builtin")) {
+ if (!_fontName.empty())
delete _font;
- _fontName = "builtin";
+ _fontName.clear();
} else if (temp != _fontName) {
- if (_fontName != "builtin")
+ if (!_fontName.empty())
delete _font;
_font = loadFont(temp.c_str());
_fontName = temp;