summaryrefslogtreecommitdiff
path: root/src/gui/skin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skin.cpp')
-rw-r--r--src/gui/skin.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index 6fcbb0e2..b1665f59 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -36,7 +36,7 @@
#include <algorithm>
-SkinLoader *skinLoader = 0;
+SkinLoader *SkinLoader::mInstance = 0;
class SkinConfigListener : public ConfigListener
@@ -113,7 +113,6 @@ int Skin::getMinHeight() const
mBorder.grid[ImageRect::LOWER_LEFT]->getHeight();
}
-
SkinLoader::SkinLoader()
: mSkinConfigListener(new SkinConfigListener(this))
{
@@ -125,6 +124,20 @@ SkinLoader::~SkinLoader()
delete mSkinConfigListener;
}
+SkinLoader *SkinLoader::instance()
+{
+ if (!mInstance)
+ mInstance = new SkinLoader;
+
+ return mInstance;
+}
+
+void SkinLoader::deleteInstance()
+{
+ delete mInstance;
+ mInstance = 0;
+}
+
Skin *SkinLoader::load(const std::string &filename,
const std::string &defaultPath)
{