mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Added an option to use plain ASCII for some special gamelist characters.
This commit is contained in:
parent
605257aa89
commit
c30fab0919
|
@ -458,6 +458,21 @@ void GuiMenu::openUIOptions()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Use ASCII for special characters in the gamelist view instead of the Font Awesome symbols.
|
||||||
|
auto special_chars_ascii = std::make_shared<SwitchComponent>(mWindow);
|
||||||
|
special_chars_ascii->setState(Settings::getInstance()->getBool("SpecialCharsASCII"));
|
||||||
|
s->addWithLabel("USE PLAIN ASCII FOR SPECIAL GAMELIST CHARACTERS", special_chars_ascii);
|
||||||
|
s->addSaveFunc([special_chars_ascii, s] {
|
||||||
|
if (special_chars_ascii->getState() !=
|
||||||
|
Settings::getInstance()->getBool("SpecialCharsASCII")) {
|
||||||
|
Settings::getInstance()->setBool("SpecialCharsASCII",
|
||||||
|
special_chars_ascii->getState());
|
||||||
|
s->setNeedsSaving();
|
||||||
|
s->setNeedsReloading();
|
||||||
|
s->setInvalidateCachedBackground();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Enable quick list scrolling overlay.
|
// Enable quick list scrolling overlay.
|
||||||
auto list_scroll_overlay = std::make_shared<SwitchComponent>(mWindow);
|
auto list_scroll_overlay = std::make_shared<SwitchComponent>(mWindow);
|
||||||
list_scroll_overlay->setState(Settings::getInstance()->getBool("ListScrollOverlay"));
|
list_scroll_overlay->setState(Settings::getInstance()->getBool("ListScrollOverlay"));
|
||||||
|
|
|
@ -77,18 +77,31 @@ void BasicGameListView::populateList(const std::vector<FileData*>& files, FileDa
|
||||||
// Add a leading tick mark icon to the game name if it's part of the custom collection
|
// Add a leading tick mark icon to the game name if it's part of the custom collection
|
||||||
// currently being edited.
|
// currently being edited.
|
||||||
if (isEditing && (*it)->getType() == GAME) {
|
if (isEditing && (*it)->getType() == GAME) {
|
||||||
if (CollectionSystemsManager::get()->inCustomCollection(editingCollection, (*it)))
|
if (CollectionSystemsManager::get()->inCustomCollection(editingCollection, (*it))) {
|
||||||
inCollectionPrefix = ViewController::TICKMARK_CHAR + " ";
|
if (Settings::getInstance()->getBool("SpecialCharsASCII"))
|
||||||
|
inCollectionPrefix = "! ";
|
||||||
else
|
else
|
||||||
|
inCollectionPrefix = ViewController::TICKMARK_CHAR + " ";
|
||||||
|
}
|
||||||
|
else {
|
||||||
inCollectionPrefix = "";
|
inCollectionPrefix = "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((*it)->getFavorite() && favoriteStar &&
|
if ((*it)->getFavorite() && favoriteStar &&
|
||||||
mRoot->getSystem()->getName() != "favorites") {
|
mRoot->getSystem()->getName() != "favorites") {
|
||||||
|
if (Settings::getInstance()->getBool("SpecialCharsASCII"))
|
||||||
|
mList.add(inCollectionPrefix + "* " +
|
||||||
|
(*it)->getName(), *it, ((*it)->getType() == FOLDER));
|
||||||
|
else
|
||||||
mList.add(inCollectionPrefix + ViewController::FAVORITE_CHAR + " " +
|
mList.add(inCollectionPrefix + ViewController::FAVORITE_CHAR + " " +
|
||||||
(*it)->getName(), *it, ((*it)->getType() == FOLDER));
|
(*it)->getName(), *it, ((*it)->getType() == FOLDER));
|
||||||
}
|
}
|
||||||
else if ((*it)->getType() == FOLDER &&
|
else if ((*it)->getType() == FOLDER &&
|
||||||
mRoot->getSystem()->getName() != "collections") {
|
mRoot->getSystem()->getName() != "collections") {
|
||||||
|
if (Settings::getInstance()->getBool("SpecialCharsASCII"))
|
||||||
|
mList.add("# " + (*it)->getName(), *it, true);
|
||||||
|
else
|
||||||
mList.add(ViewController::FOLDER_CHAR + " " + (*it)->getName(), *it, true);
|
mList.add(ViewController::FOLDER_CHAR + " " + (*it)->getName(), *it, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -145,6 +145,7 @@ void Settings::setDefaults()
|
||||||
mBoolMap["FoldersOnTop"] = { true, true };
|
mBoolMap["FoldersOnTop"] = { true, true };
|
||||||
mBoolMap["FavoritesFirst"] = { true, true };
|
mBoolMap["FavoritesFirst"] = { true, true };
|
||||||
mBoolMap["FavoritesStar"] = { true, true };
|
mBoolMap["FavoritesStar"] = { true, true };
|
||||||
|
mBoolMap["SpecialCharsASCII"] = { false, false };
|
||||||
mBoolMap["ListScrollOverlay"] = { false, false };
|
mBoolMap["ListScrollOverlay"] = { false, false };
|
||||||
mBoolMap["FavoritesAddButton"] = { true, true };
|
mBoolMap["FavoritesAddButton"] = { true, true };
|
||||||
mBoolMap["RandomAddButton"] = { false, false };
|
mBoolMap["RandomAddButton"] = { false, false };
|
||||||
|
|
Loading…
Reference in a new issue