mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 01:25: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));
|
screensaverRow.makeAcceptInputHandler(std::bind(&GuiMenu::openScreensaverOptions, this));
|
||||||
s->addRow(screensaverRow);
|
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.
|
// Blur background when the menu is open.
|
||||||
auto menuBlurBackground = std::make_shared<SwitchComponent>();
|
auto menuBlurBackground = std::make_shared<SwitchComponent>();
|
||||||
menuBlurBackground->setState(Settings::getInstance()->getBool("MenuBlurBackground"));
|
menuBlurBackground->setState(Settings::getInstance()->getBool("MenuBlurBackground"));
|
||||||
|
|
|
@ -827,8 +827,7 @@ std::shared_ptr<GamelistView> ViewController::getGamelistView(SystemData* system
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (Settings::getInstance()->getBool("ThemeVariantTriggers")) {
|
||||||
// Variant triggers.
|
|
||||||
const auto overrides = system->getTheme()->getCurrentThemeSetSelectedVariantOverrides();
|
const auto overrides = system->getTheme()->getCurrentThemeSetSelectedVariantOverrides();
|
||||||
|
|
||||||
if (!overrides.empty()) {
|
if (!overrides.empty()) {
|
||||||
|
|
|
@ -203,6 +203,7 @@ void Settings::setDefaults()
|
||||||
#endif
|
#endif
|
||||||
mBoolMap["ScreensaverVideoBlur"] = {false, false};
|
mBoolMap["ScreensaverVideoBlur"] = {false, false};
|
||||||
|
|
||||||
|
mBoolMap["ThemeVariantTriggers"] = {true, true};
|
||||||
mBoolMap["MenuBlurBackground"] = {true, true};
|
mBoolMap["MenuBlurBackground"] = {true, true};
|
||||||
mBoolMap["GamelistVideoPillarbox"] = {true, true};
|
mBoolMap["GamelistVideoPillarbox"] = {true, true};
|
||||||
mBoolMap["GamelistVideoScanlines"] = {false, false};
|
mBoolMap["GamelistVideoScanlines"] = {false, false};
|
||||||
|
|
Loading…
Reference in a new issue