mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Added a menu option to enable or disable theme variant triggers.
This commit is contained in:
parent
cc896bb626
commit
26860cd5cc
|
@ -685,6 +685,21 @@ void GuiMenu::openUIOptions()
|
|||
screensaverRow.makeAcceptInputHandler(std::bind(&GuiMenu::openScreensaverOptions, this));
|
||||
s->addRow(screensaverRow);
|
||||
|
||||
// Enable theme variant triggers.
|
||||
auto themeVariantTriggers = std::make_shared<SwitchComponent>();
|
||||
themeVariantTriggers->setState(Settings::getInstance()->getBool("ThemeVariantTriggers"));
|
||||
s->addWithLabel("ENABLE THEME VARIANT TRIGGERS", themeVariantTriggers);
|
||||
s->addSaveFunc([themeVariantTriggers, s] {
|
||||
if (themeVariantTriggers->getState() !=
|
||||
Settings::getInstance()->getBool("ThemeVariantTriggers")) {
|
||||
Settings::getInstance()->setBool("ThemeVariantTriggers",
|
||||
themeVariantTriggers->getState());
|
||||
s->setNeedsSaving();
|
||||
s->setNeedsReloading();
|
||||
s->setInvalidateCachedBackground();
|
||||
}
|
||||
});
|
||||
|
||||
// Blur background when the menu is open.
|
||||
auto menuBlurBackground = std::make_shared<SwitchComponent>();
|
||||
menuBlurBackground->setState(Settings::getInstance()->getBool("MenuBlurBackground"));
|
||||
|
|
|
@ -827,8 +827,7 @@ std::shared_ptr<GamelistView> ViewController::getGamelistView(SystemData* system
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Variant triggers.
|
||||
else if (Settings::getInstance()->getBool("ThemeVariantTriggers")) {
|
||||
const auto overrides = system->getTheme()->getCurrentThemeSetSelectedVariantOverrides();
|
||||
|
||||
if (!overrides.empty()) {
|
||||
|
|
|
@ -203,6 +203,7 @@ void Settings::setDefaults()
|
|||
#endif
|
||||
mBoolMap["ScreensaverVideoBlur"] = {false, false};
|
||||
|
||||
mBoolMap["ThemeVariantTriggers"] = {true, true};
|
||||
mBoolMap["MenuBlurBackground"] = {true, true};
|
||||
mBoolMap["GamelistVideoPillarbox"] = {true, true};
|
||||
mBoolMap["GamelistVideoScanlines"] = {false, false};
|
||||
|
|
Loading…
Reference in a new issue