fix ServiceMenu: al canviar el idioma recarrega les opcions
This commit is contained in:
@@ -30,16 +30,15 @@ ServiceMenu::ServiceMenu()
|
||||
current_settings_group_(SettingsGroup::MAIN),
|
||||
previous_settings_group_(current_settings_group_)
|
||||
{
|
||||
initializeOptions();
|
||||
setAnchors();
|
||||
updateMenu(current_settings_group_);
|
||||
reset();
|
||||
}
|
||||
|
||||
// Alterna la visibilidad del menú de servicio
|
||||
void ServiceMenu::toggle()
|
||||
{
|
||||
enabled_ = !enabled_;
|
||||
reset();
|
||||
if (!enabled_)
|
||||
reset();
|
||||
}
|
||||
|
||||
// Dibuja el menú de servicio en pantalla
|
||||
@@ -255,6 +254,8 @@ void ServiceMenu::moveBack()
|
||||
// Inicializa todas las opciones del menú de servicio
|
||||
void ServiceMenu::initializeOptions()
|
||||
{
|
||||
options_.clear();
|
||||
|
||||
// Video
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] FULLSCREEN"), SettingsGroup::VIDEO, OptionBehavior::ADJUST, &options.video.fullscreen, ValueType::BOOL);
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] WINDOW_SIZE"), SettingsGroup::VIDEO, OptionBehavior::ADJUST, &options.window.size, ValueType::INT, 1, options.window.max_size, 1);
|
||||
@@ -345,6 +346,8 @@ void ServiceMenu::reset()
|
||||
{
|
||||
selected_ = 0;
|
||||
previous_settings_group_ = current_settings_group_ = SettingsGroup::MAIN;
|
||||
initializeOptions();
|
||||
setAnchors();
|
||||
updateMenu(current_settings_group_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user