From a84e7c9414a4bd712380f8cbf3dcd74b34adcd42 Mon Sep 17 00:00:00 2001 From: Leon Styhre <leon@leonstyhre.com> Date: Mon, 5 Apr 2021 12:42:36 +0200 Subject: [PATCH] Added a notification if attempting to add a custom collection to a custom collection. --- es-app/src/views/gamelist/BasicGameListView.cpp | 6 ++++++ es-app/src/views/gamelist/ISimpleGameListView.cpp | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/es-app/src/views/gamelist/BasicGameListView.cpp b/es-app/src/views/gamelist/BasicGameListView.cpp index 9e96cf6fb..96e682f46 100644 --- a/es-app/src/views/gamelist/BasicGameListView.cpp +++ b/es-app/src/views/gamelist/BasicGameListView.cpp @@ -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; } diff --git a/es-app/src/views/gamelist/ISimpleGameListView.cpp b/es-app/src/views/gamelist/ISimpleGameListView.cpp index 6aca442c4..cc920ed49 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.cpp +++ b/es-app/src/views/gamelist/ISimpleGameListView.cpp @@ -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);