coses de la ia
This commit is contained in:
@@ -48,10 +48,35 @@ void ServiceMenu::initializeOptions()
|
||||
|
||||
// --- Settings ---
|
||||
options_.push_back(std::make_unique<BoolOption>(Lang::getText("[SERVICE_MENU] AUTOFIRE"), SettingsGroup::SETTINGS, &Options::settings.autofire));
|
||||
options_.push_back(std::make_unique<ListOption>(Lang::getText("[SERVICE_MENU] LANGUAGE"), SettingsGroup::SETTINGS, &Options::pending_changes.new_language,
|
||||
std::vector<std::string>{Lang::getText("[SERVICE_MENU] LANG_ES"), Lang::getText("[SERVICE_MENU] LANG_BA"), Lang::getText("[SERVICE_MENU] LANG_EN")}));
|
||||
options_.push_back(std::make_unique<ListOption>(Lang::getText("[SERVICE_MENU] DIFFICULTY"), SettingsGroup::SETTINGS, &Options::pending_changes.new_difficulty,
|
||||
std::vector<std::string>{Lang::getText("[SERVICE_MENU] EASY"), Lang::getText("[SERVICE_MENU] NORMAL"), Lang::getText("[SERVICE_MENU] HARD")}));
|
||||
// Opción de Idioma
|
||||
options_.push_back(std::make_unique<ListOption>(
|
||||
Lang::getText("[SERVICE_MENU] LANGUAGE"),
|
||||
SettingsGroup::SETTINGS,
|
||||
std::vector<std::string>{Lang::getText("[SERVICE_MENU] LANG_ES"), Lang::getText("[SERVICE_MENU] LANG_BA"), Lang::getText("[SERVICE_MENU] LANG_EN")},
|
||||
// Getter: Devuelve el nombre del idioma actual
|
||||
[]()
|
||||
{ return Lang::getNameFromCode(Options::pending_changes.new_language); },
|
||||
// Setter: Establece el nuevo idioma a partir de su nombre
|
||||
[](const std::string &val)
|
||||
{
|
||||
Options::pending_changes.new_language = Lang::getCodeFromName(val);
|
||||
Options::checkPendingChanges();
|
||||
}));
|
||||
|
||||
// Opción de Dificultad
|
||||
options_.push_back(std::make_unique<ListOption>(
|
||||
Lang::getText("[SERVICE_MENU] DIFFICULTY"),
|
||||
SettingsGroup::SETTINGS,
|
||||
std::vector<std::string>{Lang::getText("[SERVICE_MENU] EASY"), Lang::getText("[SERVICE_MENU] NORMAL"), Lang::getText("[SERVICE_MENU] HARD")},
|
||||
// Getter: Devuelve el nombre de la dificultad actual
|
||||
[]()
|
||||
{ return Options::getDifficultyNameFromCode(Options::pending_changes.new_difficulty); },
|
||||
// Setter: Establece la nueva dificultad a partir de su nombre
|
||||
[](const std::string &val)
|
||||
{
|
||||
Options::pending_changes.new_difficulty = Options::getDifficultyCodeFromName(val);
|
||||
Options::checkPendingChanges();
|
||||
}));
|
||||
options_.push_back(std::make_unique<BoolOption>(Lang::getText("[SERVICE_MENU] ENABLE_SHUTDOWN"), SettingsGroup::SETTINGS, &Options::settings.shutdown_enabled));
|
||||
|
||||
// --- System (con lambdas para las acciones) ---
|
||||
|
||||
Reference in New Issue
Block a user