diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-29 13:31:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-29 13:31:44 +0300 |
commit | 0ca0a5277ebd8b759367705457fb4dd018759263 (patch) | |
tree | c072864fdf2fdeaee559c319f69f5e18610c74dc /src/client.cpp | |
parent | 38aea9a883ec792d49bee91bfcec5468c15eff7a (diff) | |
download | manaverse-0ca0a5277ebd8b759367705457fb4dd018759263.tar.gz manaverse-0ca0a5277ebd8b759367705457fb4dd018759263.tar.bz2 manaverse-0ca0a5277ebd8b759367705457fb4dd018759263.tar.xz manaverse-0ca0a5277ebd8b759367705457fb4dd018759263.zip |
Move some other vars from client into settings.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/client.cpp b/src/client.cpp index 868d40454..454573ac6 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -209,7 +209,6 @@ namespace Client::Client() : ActionListener(), - mRootDir(), mCurrentServer(), mGame(nullptr), mCurrentDialog(nullptr), @@ -227,7 +226,6 @@ Client::Client() : mState(STATE_CHOOSE_SERVER), mOldState(STATE_START), mIcon(nullptr), - mCaption(), mFpsManager(), mSkin(nullptr), mGuiAlpha(1.0F), @@ -574,19 +572,19 @@ void Client::initTitle() { if (settings.options.test.empty()) { - mCaption = strprintf("%s %s", + settings.windowCaption = strprintf("%s %s", branding.getStringValue("appName").c_str(), SMALL_VERSION); } else { - mCaption = strprintf( + settings.windowCaption = strprintf( "Please wait - VIDEO MODE TEST - %s %s - Please wait", branding.getStringValue("appName").c_str(), SMALL_VERSION); } - SDL::SetWindowTitle(mainGraphics->getWindow(), mCaption.c_str()); + SDL::SetWindowTitle(mainGraphics->getWindow(), settings.windowCaption.c_str()); #ifndef WIN32 setIcon(); #endif @@ -1878,8 +1876,8 @@ void Client::action(const ActionEvent &event) void Client::initRootDir() { - mRootDir = PhysFs::getBaseDir(); - const std::string portableName = mRootDir + "portable.xml"; + settings.rootDir = PhysFs::getBaseDir(); + const std::string portableName = settings.rootDir + "portable.xml"; struct stat statbuf; if (!stat(portableName.c_str(), &statbuf) && S_ISREG(statbuf.st_mode)) @@ -1901,7 +1899,7 @@ void Client::initRootDir() dir = portable.getValue("dataDir", ""); if (!dir.empty()) { - settings.options.localDataDir = mRootDir + dir; + settings.options.localDataDir = settings.rootDir + dir; logger->log("Portable data dir: %s", settings.options.localDataDir.c_str()); } @@ -1912,7 +1910,7 @@ void Client::initRootDir() dir = portable.getValue("configDir", ""); if (!dir.empty()) { - settings.options.configDir = mRootDir + dir; + settings.options.configDir = settings.rootDir + dir; logger->log("Portable config dir: %s", settings.options.configDir.c_str()); } @@ -1923,7 +1921,7 @@ void Client::initRootDir() dir = portable.getValue("screenshotDir", ""); if (!dir.empty()) { - settings.options.screenshotDir = mRootDir + dir; + settings.options.screenshotDir = settings.rootDir + dir; logger->log("Portable screenshot dir: %s", settings.options.screenshotDir.c_str()); } @@ -2863,7 +2861,8 @@ void Client::setIsMinimized(const bool n) if (!n && mNewMessageFlag) { mNewMessageFlag = false; - SDL::SetWindowTitle(mainGraphics->getWindow(), mCaption.c_str()); + SDL::SetWindowTitle(mainGraphics->getWindow(), + settings.windowCaption.c_str()); } } @@ -2873,7 +2872,7 @@ void Client::newChatMessage() { // show * on window caption SDL::SetWindowTitle(mainGraphics->getWindow(), - ("*" + client->mCaption).c_str()); + ("*" + settings.windowCaption).c_str()); mNewMessageFlag = true; } } |