mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Show the name of the chosen language on the choice button. Looks weird not to.
This commit is contained in:
1 parent
93e5060137
commit
dd22ec6fa7
3 files changed
+13
-4
No files matched your search
@@ -846,7 +846,17 @@ void GameSettingsScreen::CreateViews() {
|
||||
LinearLayout *systemSettings = AddTab("GameSettingsSystem", ms->T("System"));
|
||||
|
||||
systemSettings->Add(new ItemHeader(sy->T("UI")));
|
||||
systemSettings->Add(new Choice(sy->T("Language")))->OnClick.Add([&](UI::EventParams &e) {
|
||||
|
||||
auto langCodeToName = [](const char *value) -> std::string {
|
||||
auto &mapping = g_Config.GetLangValuesMapping();
|
||||
auto iter = mapping.find(value);
|
||||
if (iter != mapping.end()) {
|
||||
return iter->second.first;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
systemSettings->Add(new ChoiceWithValueDisplay(&g_Config.sLanguageIni, sy->T("Language"), langCodeToName))->OnClick.Add([&](UI::EventParams &e) {
|
||||
auto sy = GetI18NCategory("System");
|
||||
auto langScreen = new NewLanguageScreen(sy->T("Language"));
|
||||
langScreen->OnChoice.Add([&](UI::EventParams &e) {
|
||||
|
||||
Reference in new issue
Block a user