diff options
Diffstat (limited to 'gui/ThemeRenderer.cpp')
-rw-r--r-- | gui/ThemeRenderer.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index b179ac75c3..9f517abd2d 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -96,7 +96,7 @@ const ThemeRenderer::TextDataInfo ThemeRenderer::kTextDataDefaults[] = { ThemeRenderer::ThemeRenderer(Common::String fileName, GraphicsMode mode) : - _vectorRenderer(0), _system(0), _graphicsMode(kGfxDisabled), + _vectorRenderer(0), _system(0), _graphicsMode(kGfxDisabled), _font(0), _screen(0), _backBuffer(0), _bytesPerPixel(0), _initOk(false), _themeOk(false), _enabled(false), _buffering(false), _cursor(0) { _system = g_system; @@ -114,16 +114,8 @@ ThemeRenderer::ThemeRenderer(Common::String fileName, GraphicsMode mode) : } _graphicsMode = mode; - setGraphicsMode(_graphicsMode); - - if (_screen->w >= 400 && _screen->h >= 300) { - _font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont); - } else { - _font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont); - } - _themeFileName = fileName; - _initOk = true; + _initOk = false; } ThemeRenderer::~ThemeRenderer() { @@ -149,6 +141,12 @@ bool ThemeRenderer::init() { clearAll(); resetDrawArea(); } + + if (_screen->w >= 400 && _screen->h >= 300) { + _font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont); + } else { + _font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont); + } if (isThemeLoadingRequired() || !_themeOk) { loadTheme(_themeFileName); @@ -185,9 +183,8 @@ void ThemeRenderer::unloadTheme() { ImageMan.unregisterSurface(i->_key); ImageMan.remArchive(_themeFileName + ".zip"); - -// _themeName.clear(); -// _themeFileName.clear(); + + _themeEval->reset(); _themeOk = false; } |