aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeNew.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ThemeNew.cpp')
-rw-r--r--gui/ThemeNew.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index 00ddc2e7e0..fc8aadcd51 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -55,7 +55,7 @@ OverlayColor calcGradient(OverlayColor start, OverlayColor end, int pos, int max
#pragma mark -
-ThemeNew::ThemeNew(OSystem *system, const Common::String &stylefile) : Theme(), _system(system), _screen(), _initOk(false),
+ThemeNew::ThemeNew(OSystem *system, const Common::String &stylefile, const Common::ConfigFile *cfg) : Theme(), _system(system), _screen(), _initOk(false),
_lastUsedBitMask(0), _forceRedraw(false), _imageHandles(0), _images(0), _colors(), _fonts(), _cursor(0), _gradientFactors() {
_stylefile = stylefile;
_initOk = false;
@@ -71,9 +71,13 @@ _lastUsedBitMask(0), _forceRedraw(false), _imageHandles(0), _images(0), _colors(
clearAll();
}
- if (!loadConfigFile(stylefile)) {
- warning("Can not find theme config file '%s'", (stylefile + ".ini").c_str());
- return;
+ if (cfg) {
+ _configFile = *cfg;
+ } else {
+ if (!loadConfigFile(stylefile)) {
+ warning("Can not find theme config file '%s'", (stylefile + ".ini").c_str());
+ return;
+ }
}
ImageMan.addArchive(stylefile + ".zip");