mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 10:21:11 +00:00
Make ComboBox usage consistent
This commit is contained in:
parent
4ac3c347ad
commit
351ce94f56
@ -508,8 +508,7 @@ namespace MWGui
|
|||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->interactiveMessageBox("#{SettingsMenu:ChangeRequiresRestart}", {"#{sOK}"}, true);
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox("#{SettingsMenu:ChangeRequiresRestart}", {"#{sOK}"}, true);
|
||||||
|
|
||||||
const auto settingsNames = _sender->getUserData<std::vector<std::string>>();
|
Settings::Manager::setString("lighting method", "Shaders", *_sender->getItemDataAt<std::string>(pos));
|
||||||
Settings::Manager::setString("lighting method", "Shaders", settingsNames->at(pos));
|
|
||||||
apply();
|
apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -528,7 +527,7 @@ namespace MWGui
|
|||||||
|
|
||||||
const auto& languageCode = *_sender->getItemDataAt<std::string>(pos);
|
const auto& languageCode = *_sender->getItemDataAt<std::string>(pos);
|
||||||
if (!languageCode.empty())
|
if (!languageCode.empty())
|
||||||
currentLocales[langPriority] = *_sender->getItemDataAt<std::string>(pos);
|
currentLocales[langPriority] = languageCode;
|
||||||
else
|
else
|
||||||
currentLocales.resize(1);
|
currentLocales.resize(1);
|
||||||
|
|
||||||
@ -749,17 +748,13 @@ namespace MWGui
|
|||||||
SceneUtil::LightingMethod::SingleUBO,
|
SceneUtil::LightingMethod::SingleUBO,
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<std::string> userData;
|
|
||||||
for (const auto& method : methods)
|
for (const auto& method : methods)
|
||||||
{
|
{
|
||||||
if (!MWBase::Environment::get().getResourceSystem()->getSceneManager()->isSupportedLightingMethod(method))
|
if (!MWBase::Environment::get().getResourceSystem()->getSceneManager()->isSupportedLightingMethod(method))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
mLightingMethodButton->addItem(lightingMethodToStr(method));
|
mLightingMethodButton->addItem(lightingMethodToStr(method), SceneUtil::LightManager::getLightingMethodString(method));
|
||||||
userData.emplace_back(SceneUtil::LightManager::getLightingMethodString(method));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mLightingMethodButton->setUserData(userData);
|
|
||||||
mLightingMethodButton->setIndexSelected(mLightingMethodButton->findItemIndexWith(lightingMethodStr));
|
mLightingMethodButton->setIndexSelected(mLightingMethodButton->findItemIndexWith(lightingMethodStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user