|
|
@ -37,10 +37,20 @@ namespace
|
|
|
|
|
|
|
|
|
|
|
|
std::string textureFilteringToStr(const std::string& val)
|
|
|
|
std::string textureFilteringToStr(const std::string& val)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (val == "trilinear")
|
|
|
|
if (val == "nearest")
|
|
|
|
return "Trilinear";
|
|
|
|
return "Nearest";
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return "Bilinear";
|
|
|
|
return "Linear";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string textureMipmappingToStr(const std::string& val)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (val == "linear")
|
|
|
|
|
|
|
|
return "Linear";
|
|
|
|
|
|
|
|
else if (val == "none")
|
|
|
|
|
|
|
|
return "None";
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return "Nearest";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void parseResolution (int &x, int &y, const std::string& str)
|
|
|
|
void parseResolution (int &x, int &y, const std::string& str)
|
|
|
@ -169,6 +179,7 @@ namespace MWGui
|
|
|
|
getWidget(mFOVSlider, "FOVSlider");
|
|
|
|
getWidget(mFOVSlider, "FOVSlider");
|
|
|
|
getWidget(mAnisotropySlider, "AnisotropySlider");
|
|
|
|
getWidget(mAnisotropySlider, "AnisotropySlider");
|
|
|
|
getWidget(mTextureFilteringButton, "TextureFilteringButton");
|
|
|
|
getWidget(mTextureFilteringButton, "TextureFilteringButton");
|
|
|
|
|
|
|
|
getWidget(mTextureMipmappingButton, "TextureMipmappingButton");
|
|
|
|
getWidget(mAnisotropyLabel, "AnisotropyLabel");
|
|
|
|
getWidget(mAnisotropyLabel, "AnisotropyLabel");
|
|
|
|
getWidget(mAnisotropyBox, "AnisotropyBox");
|
|
|
|
getWidget(mAnisotropyBox, "AnisotropyBox");
|
|
|
|
getWidget(mShadersButton, "ShadersButton");
|
|
|
|
getWidget(mShadersButton, "ShadersButton");
|
|
|
@ -200,6 +211,7 @@ namespace MWGui
|
|
|
|
mSettingsTab->eventTabChangeSelect += MyGUI::newDelegate(this, &SettingsWindow::onTabChanged);
|
|
|
|
mSettingsTab->eventTabChangeSelect += MyGUI::newDelegate(this, &SettingsWindow::onTabChanged);
|
|
|
|
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onOkButtonClicked);
|
|
|
|
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onOkButtonClicked);
|
|
|
|
mTextureFilteringButton->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onTextureFilteringChanged);
|
|
|
|
mTextureFilteringButton->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onTextureFilteringChanged);
|
|
|
|
|
|
|
|
mTextureMipmappingButton->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onTextureMipmappingChanged);
|
|
|
|
mResolutionList->eventListChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onResolutionSelected);
|
|
|
|
mResolutionList->eventListChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onResolutionSelected);
|
|
|
|
|
|
|
|
|
|
|
|
mWaterTextureSize->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onWaterTextureSizeChanged);
|
|
|
|
mWaterTextureSize->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onWaterTextureSizeChanged);
|
|
|
@ -237,6 +249,8 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
std::string tf = Settings::Manager::getString("texture filtering", "General");
|
|
|
|
std::string tf = Settings::Manager::getString("texture filtering", "General");
|
|
|
|
mTextureFilteringButton->setCaption(textureFilteringToStr(tf));
|
|
|
|
mTextureFilteringButton->setCaption(textureFilteringToStr(tf));
|
|
|
|
|
|
|
|
std::string tmip = Settings::Manager::getString("texture mipmapping", "General");
|
|
|
|
|
|
|
|
mTextureMipmappingButton->setCaption(textureMipmappingToStr(tmip));
|
|
|
|
mAnisotropyLabel->setCaption("Anisotropy (" + MyGUI::utility::toString(Settings::Manager::getInt("anisotropy", "General")) + ")");
|
|
|
|
mAnisotropyLabel->setCaption("Anisotropy (" + MyGUI::utility::toString(Settings::Manager::getInt("anisotropy", "General")) + ")");
|
|
|
|
|
|
|
|
|
|
|
|
int waterTextureSize = Settings::Manager::getInt ("rtt size", "Water");
|
|
|
|
int waterTextureSize = Settings::Manager::getInt ("rtt size", "Water");
|
|
|
@ -429,6 +443,12 @@ namespace MWGui
|
|
|
|
apply();
|
|
|
|
apply();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::onTextureMipmappingChanged(MyGUI::ComboBox* _sender, size_t pos)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Settings::Manager::setString("texture mipmapping", "General", Misc::StringUtils::lowerCase(_sender->getItemNameAt(pos)));
|
|
|
|
|
|
|
|
apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
|
|
|
|
void SettingsWindow::onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (getSettingType(scroller) == "Slider")
|
|
|
|
if (getSettingType(scroller) == "Slider")
|
|
|
|