Added a notification if attempting to add a custom collection to a custom collection.

This commit is contained in:
Leon Styhre 2021-04-05 12:42:36 +02:00
parent b51f99ab77
commit a84e7c9414
2 changed files with 16 additions and 1 deletions

View file

@ -333,5 +333,11 @@ std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
prompts.push_back(HelpPrompt("y", prompt));
}
else if (mRoot->getSystem()->isGameSystem() &&
mRoot->getSystem()->getThemeFolder() == "custom-collections" &&
CollectionSystemsManager::get()->isEditing()) {
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
prompts.push_back(HelpPrompt("y", prompt));
}
return prompts;
}

View file

@ -238,7 +238,16 @@ bool ISimpleGameListView::input(InputConfig* config, Input input)
else if (config->isMappedTo("y", input) &&
!UIModeController::getInstance()->isUIModeKid() &&
!UIModeController::getInstance()->isUIModeKiosk()) {
if (mRoot->getSystem()->isGameSystem() && getCursor()->getType() != PLACEHOLDER &&
// Notify the user if attempting to add a custom collection to a custom collection.
if (CollectionSystemsManager::get()->isEditing() &&
mRoot->getSystem()->isGameSystem() && getCursor()->getType() != PLACEHOLDER &&
getCursor()->getParent()->getPath() == "collections") {
GuiInfoPopup* s;
s = new GuiInfoPopup(mWindow,
"CAN'T ADD CUSTOM COLLECTIONS TO CUSTOM COLLECTIONS", 4000);
mWindow->setInfoPopup(s);
}
else if (mRoot->getSystem()->isGameSystem() && getCursor()->getType() != PLACEHOLDER &&
getCursor()->getParent()->getPath() != "collections") {
if (getCursor()->getType() == GAME || getCursor()->getType() == FOLDER)
NavigationSounds::getInstance()->playThemeNavigationSound(FAVORITESOUND);