1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-15 22:49:48 +00:00

Merge branch 'settingswindow' into 'master'

Hide the settings window when any main menu button is pressed

See merge request OpenMW/openmw!4136
This commit is contained in:
psi29a 2024-06-01 15:31:56 +00:00
commit 05815b3952

View File

@ -100,10 +100,6 @@ namespace MWGui
{
winMgr->removeGuiMode(GM_MainMenu);
}
else if (name == "options")
{
winMgr->toggleSettingsWindow();
}
else if (name == "credits")
winMgr->playVideo("mw_credits.bik", true);
else if (name == "exitgame")
@ -132,17 +128,18 @@ namespace MWGui
dialog->eventCancelClicked.clear();
}
}
else
else if (name == "loadgame" || name == "savegame")
{
if (!mSaveGameDialog)
mSaveGameDialog = std::make_unique<SaveGameDialog>();
if (name == "loadgame")
mSaveGameDialog->setLoadOrSave(true);
else if (name == "savegame")
mSaveGameDialog->setLoadOrSave(false);
mSaveGameDialog->setLoadOrSave(name == "loadgame");
mSaveGameDialog->setVisible(true);
}
if (winMgr->isSettingsWindowVisible() || name == "options")
{
winMgr->toggleSettingsWindow();
}
}
void MainMenu::showBackground(bool show)