From 775674a77f78c583f30f31588315a42d4695946c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 27 Nov 2021 00:26:01 +0100 Subject: [PATCH] The 'Custom game collections' menu entry is now grayed out if there are no custom collections. --- es-app/src/guis/GuiCollectionSystemsOptions.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/es-app/src/guis/GuiCollectionSystemsOptions.cpp b/es-app/src/guis/GuiCollectionSystemsOptions.cpp index 695bac6d3..6ada1030d 100644 --- a/es-app/src/guis/GuiCollectionSystemsOptions.cpp +++ b/es-app/src/guis/GuiCollectionSystemsOptions.cpp @@ -148,6 +148,15 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(Window* window, std::st } }); + // If there are no custom collections, then gray out this menu entry. + if (customSystems.empty()) { + collection_systems_custom->setEnabled(false); + collection_systems_custom->setOpacity(DISABLED_OPACITY); + collection_systems_custom->getParent() + ->getChild(collection_systems_custom->getChildIndex() - 1) + ->setOpacity(DISABLED_OPACITY); + } + // Create custom collection from theme. std::vector unusedFolders = CollectionSystemsManager::get()->getUnusedSystemsFromTheme();