|
|
|
@ -291,15 +291,12 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
mLightSettingOverlay->setEnabled(false);
|
|
|
|
|
mLightSettingOverlay->setAlpha(0.8);
|
|
|
|
|
parent->setUserString("ToolTipType", "Layout");
|
|
|
|
|
parent->setUserString("ToolTipLayout", "TextToolTip");
|
|
|
|
|
parent->setUserString("Caption_Text", warningText);
|
|
|
|
|
parent->setUserString("Caption_Text", "Unavailable with current settings.");
|
|
|
|
|
parent->setEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -408,18 +405,15 @@ namespace MWGui
|
|
|
|
|
void SettingsWindow::onLightsResetButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
int selectedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
|
|
|
|
if (selectedButton == 1 || selectedButton == -1)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
Settings::Manager::setString("lighting method", "Shaders", "shaders compatibility");
|
|
|
|
|
Settings::Manager::setFloat("light bounds multiplier", "Shaders", 1.75);
|
|
|
|
|
Settings::Manager::setInt("maximum light distance", "Shaders", 8192);
|
|
|
|
|
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);
|
|
|
|
|
const std::vector<std::string> settings = {"light bounds multiplier", "maximum light distance", "light fade start", "minimum interior brightness", "max lights"};
|
|
|
|
|
for (const auto& setting : settings)
|
|
|
|
|
Settings::Manager::setString(setting, "Shaders", Settings::Manager::mDefaultSettings[{"Shaders", setting}]);
|
|
|
|
|
|
|
|
|
|
apply();
|
|
|
|
|
configureWidgets(mMainWidget, false);
|
|
|
|
|