mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +00:00
Select the current resolution in resolution list on game start (Fixes #2768)
This commit is contained in:
parent
d22f8703e5
commit
f1b52c964a
2 changed files with 22 additions and 0 deletions
|
@ -233,6 +233,7 @@ namespace MWGui
|
||||||
if (mResolutionList->findItemIndexWith(str) == MyGUI::ITEM_NONE)
|
if (mResolutionList->findItemIndexWith(str) == MyGUI::ITEM_NONE)
|
||||||
mResolutionList->addItem(str);
|
mResolutionList->addItem(str);
|
||||||
}
|
}
|
||||||
|
highlightCurrentResolution();
|
||||||
|
|
||||||
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));
|
||||||
|
@ -299,8 +300,28 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::onResolutionCancel()
|
void SettingsWindow::onResolutionCancel()
|
||||||
|
{
|
||||||
|
highlightCurrentResolution();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SettingsWindow::highlightCurrentResolution()
|
||||||
{
|
{
|
||||||
mResolutionList->setIndexSelected(MyGUI::ITEM_NONE);
|
mResolutionList->setIndexSelected(MyGUI::ITEM_NONE);
|
||||||
|
|
||||||
|
int currentX = Settings::Manager::getInt("resolution x", "Video");
|
||||||
|
int currentY = Settings::Manager::getInt("resolution y", "Video");
|
||||||
|
|
||||||
|
for (size_t i=0; i<mResolutionList->getItemCount(); ++i)
|
||||||
|
{
|
||||||
|
int resX, resY;
|
||||||
|
parseResolution (resX, resY, mResolutionList->getItemNameAt(i));
|
||||||
|
|
||||||
|
if (resX == currentX && resY == currentY)
|
||||||
|
{
|
||||||
|
mResolutionList->setIndexSelected(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::onShadowTextureSizeChanged(MyGUI::ComboBox *_sender, size_t pos)
|
void SettingsWindow::onShadowTextureSizeChanged(MyGUI::ComboBox *_sender, size_t pos)
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace MWGui
|
||||||
void onResolutionSelected(MyGUI::ListBox* _sender, size_t index);
|
void onResolutionSelected(MyGUI::ListBox* _sender, size_t index);
|
||||||
void onResolutionAccept();
|
void onResolutionAccept();
|
||||||
void onResolutionCancel();
|
void onResolutionCancel();
|
||||||
|
void highlightCurrentResolution();
|
||||||
|
|
||||||
void onShadowTextureSizeChanged(MyGUI::ComboBox* _sender, size_t pos);
|
void onShadowTextureSizeChanged(MyGUI::ComboBox* _sender, size_t pos);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue