summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-16 14:14:29 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-16 14:14:29 +0300
commit46087564d4184b28740b0c45c1bac199ab1942ec (patch)
tree0591b36aba2ae392eb569828930f030850cbc769 /src/client.cpp
parentcf9b1182f06b1336f0d1071c267ea36c990430fa (diff)
downloadmv-46087564d4184b28740b0c45c1bac199ab1942ec.tar.gz
mv-46087564d4184b28740b0c45c1bac199ab1942ec.tar.bz2
mv-46087564d4184b28740b0c45c1bac199ab1942ec.tar.xz
mv-46087564d4184b28740b0c45c1bac199ab1942ec.zip
Improve theme usage.
Removed instance method.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp
index d8cd1f6f2..24a10574e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -399,6 +399,7 @@ void Client::gameInit()
initTitle();
+ theme = new Theme;
Theme::selectSkin();
touchManager.init();
@@ -998,8 +999,7 @@ int Client::gameExec()
mumbleManager = new MumbleManager();
#endif
- if (Theme::instance())
- mSkin = Theme::instance()->load("windowmenu.xml", "");
+ mSkin = theme->load("windowmenu.xml", "");
if (mSkin)
{
mButtonPadding = mSkin->getPadding();
@@ -1256,7 +1256,7 @@ int Client::gameExec()
{
// Don't allow an alpha opacity
// lower than the default value
- Theme::instance()->setMinimumOpacity(0.8F);
+ theme->setMinimumOpacity(0.8F);
mCurrentDialog = new ServerDialog(&mCurrentServer,
mConfigDir);
@@ -1298,7 +1298,7 @@ int Client::gameExec()
logger->log1("State: LOGIN");
// Don't allow an alpha opacity
// lower than the default value
- Theme::instance()->setMinimumOpacity(0.8F);
+ theme->setMinimumOpacity(0.8F);
loginData.updateType
= serverConfig.getValue("updateType", 1);
@@ -1505,7 +1505,7 @@ int Client::gameExec()
logger->log1("State: CHAR SELECT");
// Don't allow an alpha opacity
// lower than the default value
- Theme::instance()->setMinimumOpacity(0.8F);
+ theme->setMinimumOpacity(0.8F);
mCurrentDialog = new CharSelectDialog(&loginData);
mCurrentDialog->postInit();
@@ -1571,7 +1571,7 @@ int Client::gameExec()
soundManager.fadeOutMusic(1000);
// Allow any alpha opacity
- Theme::instance()->setMinimumOpacity(-1.0F);
+ theme->setMinimumOpacity(-1.0F);
if (chatLogger)
chatLogger->setServerName(mServerName);