mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-30 01:55:39 +00:00
Add confirmation popup when changing to UI mode Kid or Kiosk.
This commit is contained in:
parent
c70acc88de
commit
df7ef94462
|
@ -168,8 +168,21 @@ void GuiMenu::openUISettings()
|
||||||
Window* window = mWindow;
|
Window* window = mWindow;
|
||||||
s->addSaveFunc([ UImodeSelection, window]
|
s->addSaveFunc([ UImodeSelection, window]
|
||||||
{
|
{
|
||||||
LOG(LogDebug) << "Setting UI mode to" << UImodeSelection->getSelected();
|
std::string selectedMode = UImodeSelection->getSelected();
|
||||||
Settings::getInstance()->setString("UIMode", UImodeSelection->getSelected());
|
if (selectedMode != "Full")
|
||||||
|
{
|
||||||
|
std::string msg = "You are changing the UI to a restricted mode:\n" + selectedMode + "\n";
|
||||||
|
msg += "This will hide most menu-options to prevent changes to the system.\n";
|
||||||
|
msg += "To unlock and return to the full UI, enter this code: \n";
|
||||||
|
msg += "Up, up, down, down, left, right, left, right, B, A. \n\n";
|
||||||
|
msg += "Do you want to proceed?";
|
||||||
|
|
||||||
|
window->pushGui(new GuiMsgBox(window, msg, "YES",
|
||||||
|
[selectedMode] {
|
||||||
|
LOG(LogDebug) << "Setting UI mode to" << selectedMode;
|
||||||
|
Settings::getInstance()->setString("UIMode", selectedMode);
|
||||||
|
}, "NO", nullptr));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// screensaver
|
// screensaver
|
||||||
|
|
Loading…
Reference in a new issue