forked from teamnwah/openmw-tes3coop
fixed GMST string handling in GUI
This commit is contained in:
parent
35d7b5e5b0
commit
d1c4559abe
3 changed files with 4 additions and 4 deletions
|
@ -213,7 +213,7 @@ namespace MWBase
|
|||
* @param id Identifier for the GMST setting, e.g. "aName"
|
||||
* @param default Default value if the GMST setting cannot be used.
|
||||
*/
|
||||
virtual const std::string &getGameSettingString(const std::string &id, const std::string &default_) = 0;
|
||||
virtual std::string getGameSettingString(const std::string &id, const std::string &default_) = 0;
|
||||
|
||||
virtual void processChangedSettings(const Settings::CategorySettingVector& changed) = 0;
|
||||
|
||||
|
|
|
@ -520,9 +520,9 @@ int WindowManager::readPressedButton ()
|
|||
return mMessageBoxManager->readPressedButton();
|
||||
}
|
||||
|
||||
const std::string &WindowManager::getGameSettingString(const std::string &id, const std::string &default_)
|
||||
std::string WindowManager::getGameSettingString(const std::string &id, const std::string &default_)
|
||||
{
|
||||
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.find(id);
|
||||
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.search(id);
|
||||
if (setting && setting->mType == ESM::VT_String)
|
||||
return setting->getString();
|
||||
return default_;
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace MWGui
|
|||
* @param id Identifier for the GMST setting, e.g. "aName"
|
||||
* @param default Default value if the GMST setting cannot be used.
|
||||
*/
|
||||
virtual const std::string &getGameSettingString(const std::string &id, const std::string &default_);
|
||||
virtual std::string getGameSettingString(const std::string &id, const std::string &default_);
|
||||
|
||||
virtual void processChangedSettings(const Settings::CategorySettingVector& changed);
|
||||
|
||||
|
|
Loading…
Reference in a new issue