Marked the Grid view style as experimental in the UI settings.

This commit is contained in:
Leon Styhre 2021-03-21 11:21:45 +01:00
parent 0780538de9
commit a6c3cb9798

View file

@ -130,15 +130,16 @@ void GuiMenu::openUISettings()
// GameList view style. // GameList view style.
auto gamelist_view_style = std::make_shared<OptionListComponent<std::string>> auto gamelist_view_style = std::make_shared<OptionListComponent<std::string>>
(mWindow, getHelpStyle(), "GAMELIST VIEW STYLE", false); (mWindow, getHelpStyle(), "GAMELIST VIEW STYLE", false);
std::vector<std::string> styles; std::string selectedViewStyle = Settings::getInstance()->getString("GamelistViewStyle");
styles.push_back("automatic"); gamelist_view_style->add("automatic", "automatic", selectedViewStyle == "automatic");
styles.push_back("basic"); gamelist_view_style->add("basic", "basic", selectedViewStyle == "basic");
styles.push_back("detailed"); gamelist_view_style->add("detailed", "detailed", selectedViewStyle == "detailed");
styles.push_back("video"); gamelist_view_style->add("video", "video", selectedViewStyle == "video");
styles.push_back("grid"); gamelist_view_style->add("grid (experimental)", "grid", selectedViewStyle == "grid");
for (auto it = styles.cbegin(); it != styles.cend(); it++) // If there are no objects returned, then there must be a manually modified entry in the
gamelist_view_style->add(*it, *it, Settings::getInstance()-> // configuration file. Simply set the view style to Automatic in this case.
getString("GamelistViewStyle") == *it); if (gamelist_view_style->getSelectedObjects().size() == 0)
gamelist_view_style->selectEntry(0);
s->addWithLabel("GAMELIST VIEW STYLE", gamelist_view_style); s->addWithLabel("GAMELIST VIEW STYLE", gamelist_view_style);
s->addSaveFunc([gamelist_view_style, s] { s->addSaveFunc([gamelist_view_style, s] {
if (gamelist_view_style->getSelected() != if (gamelist_view_style->getSelected() !=