mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Merge pull request #645 from pjft/kids-start-menu
Option to show start menu in Kids mode
This commit is contained in:
commit
9c46f50497
|
@ -366,6 +366,12 @@ void GuiMenu::openUISettings()
|
|||
if (enable_filter->getState() != filter_is_enabled) ViewController::get()->ReloadAndGoToStart();
|
||||
});
|
||||
|
||||
// hide start menu in Kid Mode
|
||||
auto disable_start = std::make_shared<SwitchComponent>(mWindow);
|
||||
disable_start->setState(Settings::getInstance()->getBool("DisableKidStartMenu"));
|
||||
s->addWithLabel("DISABLE START MENU IN KID MODE", disable_start);
|
||||
s->addSaveFunc([disable_start] { Settings::getInstance()->setBool("DisableKidStartMenu", disable_start->getState()); });
|
||||
|
||||
mWindow->pushGui(s);
|
||||
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ bool ViewController::input(InputConfig* config, Input input)
|
|||
return true;
|
||||
|
||||
// open menu
|
||||
if(!UIModeController::getInstance()->isUIModeKid() && config->isMappedTo("start", input) && input.value != 0)
|
||||
if(!(UIModeController::getInstance()->isUIModeKid() && Settings::getInstance()->getBool("DisableKidStartMenu")) && config->isMappedTo("start", input) && input.value != 0)
|
||||
{
|
||||
// open menu
|
||||
mWindow->pushGui(new GuiMenu(mWindow));
|
||||
|
@ -533,7 +533,7 @@ std::vector<HelpPrompt> ViewController::getHelpPrompts()
|
|||
return prompts;
|
||||
|
||||
prompts = mCurrentView->getHelpPrompts();
|
||||
if(!UIModeController::getInstance()->isUIModeKid())
|
||||
if(!(UIModeController::getInstance()->isUIModeKid() && Settings::getInstance()->getBool("DisableKidStartMenu")))
|
||||
prompts.push_back(HelpPrompt("start", "menu"));
|
||||
|
||||
return prompts;
|
||||
|
|
|
@ -65,6 +65,7 @@ void Settings::setDefaults()
|
|||
mBoolMap["SplashScreen"] = true;
|
||||
mBoolMap["SplashScreenProgress"] = true;
|
||||
mStringMap["StartupSystem"] = "";
|
||||
mBoolMap["DisableKidStartMenu"] = true;
|
||||
|
||||
mBoolMap["VSync"] = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue