mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
The theme transitions menu entry is now grayed out if there are no transitions to choose between.
This commit is contained in:
parent
192f218bd5
commit
9dab1557ca
|
@ -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()
|
||||
|
|
|
@ -156,6 +156,8 @@ public:
|
|||
return GuiComponent::input(config, input);
|
||||
}
|
||||
|
||||
const int getNumEntries() { return mEntries.size(); }
|
||||
|
||||
std::vector<T> getSelectedObjects()
|
||||
{
|
||||
std::vector<T> ret;
|
||||
|
|
Loading…
Reference in a new issue