ServiceMenu: ja es pot canviar la dificultat
This commit is contained in:
@@ -116,6 +116,29 @@ namespace Lang
|
||||
}
|
||||
}
|
||||
|
||||
// Actualiza los nombres de las dificultades
|
||||
void updateDifficultyNames()
|
||||
{
|
||||
for (auto &difficulty : Options::difficulties)
|
||||
{
|
||||
switch (difficulty.code)
|
||||
{
|
||||
case Options::DifficultyCode::EASY:
|
||||
difficulty.name = Lang::getText("[SERVICE_MENU] EASY");
|
||||
break;
|
||||
case Options::DifficultyCode::NORMAL:
|
||||
difficulty.name = Lang::getText("[SERVICE_MENU] NORMAL");
|
||||
break;
|
||||
case Options::DifficultyCode::HARD:
|
||||
difficulty.name = Lang::getText("[SERVICE_MENU] HARD");
|
||||
break;
|
||||
default:
|
||||
difficulty.name = "Unknown";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Obtiene una fichero a partir de un lang::Code
|
||||
std::string getLanguageFileName(Lang::Code code)
|
||||
{
|
||||
@@ -134,5 +157,6 @@ namespace Lang
|
||||
Options::settings.language = lang;
|
||||
loadFromFile(Asset::get()->get(getLanguage(lang).file_name));
|
||||
updateLanguageNames();
|
||||
updateDifficultyNames();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user