mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
use true default settings
This commit is contained in:
parent
d4e7d25d14
commit
b7adb9d088
@ -291,15 +291,12 @@ namespace MWGui
|
|||||||
|
|
||||||
if (lightingMethod == SceneUtil::LightingMethod::FFP || !Settings::Manager::getBool("force shaders", "Shaders"))
|
if (lightingMethod == SceneUtil::LightingMethod::FFP || !Settings::Manager::getBool("force shaders", "Shaders"))
|
||||||
{
|
{
|
||||||
std::string warningText =
|
|
||||||
"Unavailable with current settings."
|
|
||||||
"\n\nEnable \"force shaders\" and use either the \"shaders\" or \"shaders compatibility\" lighting method.";
|
|
||||||
MyGUI::Widget* parent = mLightSettingOverlay->getParent();
|
MyGUI::Widget* parent = mLightSettingOverlay->getParent();
|
||||||
mLightSettingOverlay->setEnabled(false);
|
mLightSettingOverlay->setEnabled(false);
|
||||||
mLightSettingOverlay->setAlpha(0.8);
|
mLightSettingOverlay->setAlpha(0.8);
|
||||||
parent->setUserString("ToolTipType", "Layout");
|
parent->setUserString("ToolTipType", "Layout");
|
||||||
parent->setUserString("ToolTipLayout", "TextToolTip");
|
parent->setUserString("ToolTipLayout", "TextToolTip");
|
||||||
parent->setUserString("Caption_Text", warningText);
|
parent->setUserString("Caption_Text", "Unavailable with current settings.");
|
||||||
parent->setEnabled(true);
|
parent->setEnabled(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -408,18 +405,15 @@ namespace MWGui
|
|||||||
void SettingsWindow::onLightsResetButtonClicked(MyGUI::Widget* _sender)
|
void SettingsWindow::onLightsResetButtonClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
std::vector<std::string> buttons = {"#{sYes}", "#{sNo}"};
|
std::vector<std::string> buttons = {"#{sYes}", "#{sNo}"};
|
||||||
std::string message = "This will reset all lighting settings to default, some changes will require a restart. Would you like to continue?";
|
std::string message = "Resets to default values, would you like to continue?";
|
||||||
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(message, buttons, true);
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(message, buttons, true);
|
||||||
int selectedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
int selectedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
||||||
if (selectedButton == 1 || selectedButton == -1)
|
if (selectedButton == 1 || selectedButton == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Settings::Manager::setString("lighting method", "Shaders", "shaders compatibility");
|
const std::vector<std::string> settings = {"light bounds multiplier", "maximum light distance", "light fade start", "minimum interior brightness", "max lights"};
|
||||||
Settings::Manager::setFloat("light bounds multiplier", "Shaders", 1.75);
|
for (const auto& setting : settings)
|
||||||
Settings::Manager::setInt("maximum light distance", "Shaders", 8192);
|
Settings::Manager::setString(setting, "Shaders", Settings::Manager::mDefaultSettings[{"Shaders", setting}]);
|
||||||
Settings::Manager::setFloat("light fade start", "Shaders", 0.85);
|
|
||||||
Settings::Manager::setFloat("minimum interior brightness", "Shaders", 0.1);
|
|
||||||
Settings::Manager::setInt("max lights", "Shaders", 8);
|
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
configureWidgets(mMainWidget, false);
|
configureWidgets(mMainWidget, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user