diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 7361d4aab..be5cdbe74 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -393,6 +393,23 @@ void GuiMenu::openUIOptions() } if (themeTransitions->getSelectedObjects().size() == 0) themeTransitions->selectEntry(0); + + if (themeTransitions->getNumEntries() == 1) { + themeTransitions->setEnabled(false); + themeTransitions->setOpacity(DISABLED_OPACITY); + themeTransitions->getParent() + ->getChild(themeTransitions->getChildIndex() - 1) + ->setOpacity(DISABLED_OPACITY); + } + else { + themeTransitions->setEnabled(true); + themeTransitions->setOpacity(1.0f); + themeTransitions->getParent() + ->getChild(themeTransitions->getChildIndex() - 1) + ->setOpacity(1.0f); + } + + LOG(LogError) << "SELECTABLE ENTRIES: " << themeTransitions->getNumEntries(); } }; @@ -916,12 +933,6 @@ void GuiMenu::openUIOptions() ->getChild(gamelistViewStyle->getChildIndex() - 1) ->setOpacity(DISABLED_OPACITY); - themeTransitions->setEnabled(true); - themeTransitions->setOpacity(1.0f); - themeTransitions->getParent() - ->getChild(themeTransitions->getChildIndex() - 1) - ->setOpacity(1.0f); - legacyThemeTransitions->setEnabled(false); legacyThemeTransitions->setOpacity(DISABLED_OPACITY); legacyThemeTransitions->getParent() diff --git a/es-core/src/components/OptionListComponent.h b/es-core/src/components/OptionListComponent.h index f0ab9f5b5..1ca2eec94 100644 --- a/es-core/src/components/OptionListComponent.h +++ b/es-core/src/components/OptionListComponent.h @@ -156,6 +156,8 @@ public: return GuiComponent::input(config, input); } + const int getNumEntries() { return mEntries.size(); } + std::vector getSelectedObjects() { std::vector ret;