ServiceMenu: ja es funcional el menu de system

This commit is contained in:
2025-06-05 14:20:39 +02:00
parent f1c576beef
commit d4bb3109c7

View File

@@ -6,6 +6,7 @@
#include "text.h"
#include "resource.h"
#include "options.h"
#include "section.h" // Para Name, name, Options, options, AttractMode
// Singleton
ServiceMenu *ServiceMenu::instance_ = nullptr;
@@ -169,6 +170,28 @@ void ServiceMenu::acceptSelection()
updateMenu(current_settings_group_);
selected_ = 0;
}
else if (display_options_.at(selected_).behavior == OptionBehavior::SELECT)
{
if (display_options_.at(selected_).caption == "RESET")
{
section::name = section::Name::INIT;
toggle();
return;
}
else if (display_options_.at(selected_).caption == "QUIT")
{
section::name = section::Name::QUIT;
section::options = section::Options::QUIT_WITH_KEYBOARD;
return;
}
else if (display_options_.at(selected_).caption == "SHUTDOWN")
{
section::name = section::Name::QUIT;
section::options = section::Options::QUIT_WITH_CONTROLLER;
return;
}
}
}
void ServiceMenu::moveBack()