feat: add a separate setting for selecting 'text language' when ALL_LANGS is set (#6960)
This commit is contained in:
@@ -98,7 +98,10 @@ enum MenuRadioSetupItems {
|
||||
CASE_GPS(ITEM_RADIO_SETUP_ADJUST_RTC)
|
||||
CASE_GPS(ITEM_RADIO_SETUP_GPSFORMAT)
|
||||
CASE_PXX1(ITEM_RADIO_SETUP_COUNTRYCODE)
|
||||
ITEM_RADIO_SETUP_LANGUAGE,
|
||||
ITEM_RADIO_SETUP_VOICE_LANGUAGE,
|
||||
#if defined(ALL_LANGS)
|
||||
ITEM_RADIO_SETUP_TEXT_LANGUAGE,
|
||||
#endif
|
||||
ITEM_RADIO_SETUP_IMPERIAL,
|
||||
ITEM_RADIO_SETUP_PPM,
|
||||
IF_FAI_CHOICE(ITEM_RADIO_SETUP_FAI)
|
||||
@@ -238,6 +241,9 @@ void menuRadioSetup(event_t event)
|
||||
CASE_GPS(0)
|
||||
CASE_PXX1(0) // country code
|
||||
0, // voice language
|
||||
#if defined(ALL_LANGS)
|
||||
0, // text language
|
||||
#endif
|
||||
0, // imperial
|
||||
0, // PPM unit
|
||||
IF_FAI_CHOICE(0)
|
||||
@@ -679,7 +685,7 @@ void menuRadioSetup(event_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_RADIO_SETUP_LANGUAGE:
|
||||
case ITEM_RADIO_SETUP_VOICE_LANGUAGE:
|
||||
lcdDrawTextAlignedLeft(y, STR_VOICE_LANGUAGE);
|
||||
#if !defined(ALL_LANGS)
|
||||
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, currentLanguagePack->name, attr);
|
||||
@@ -691,15 +697,27 @@ void menuRadioSetup(event_t event)
|
||||
if (checkIncDec_Ret) {
|
||||
currentLanguagePack = languagePacks[currentLanguagePackIdx];
|
||||
strncpy(g_eeGeneral.ttsLanguage, currentLanguagePack->id, 2);
|
||||
#if defined(ALL_LANGS)
|
||||
currentLangStrings = langStrings[currentLanguagePackIdx];
|
||||
extern void setLanguageFont(int n);
|
||||
setLanguageFont(currentLanguagePackIdx);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(ALL_LANGS)
|
||||
case ITEM_RADIO_SETUP_TEXT_LANGUAGE:
|
||||
lcdDrawTextAlignedLeft(y, STR_TEXT_LANGUAGE);
|
||||
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, languagePacks[getLanguageId(g_eeGeneral.uiLanguage)]->name(), attr);
|
||||
if (attr) {
|
||||
int textLangId = checkIncDec(event, getLanguageId(g_eeGeneral.uiLanguage), 0, DIM(languagePacks)-2, EE_GENERAL, isTextLangAvail);
|
||||
if (checkIncDec_Ret) {
|
||||
currentLanguagePack = languagePacks[currentLanguagePackIdx];
|
||||
strncpy(g_eeGeneral.uiLanguage, languagePacks[textLangId]->id, 2);
|
||||
currentLangStrings = langStrings[textLangId];
|
||||
extern void setLanguageFont(int n);
|
||||
setLanguageFont(textLangId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_RADIO_SETUP_IMPERIAL:
|
||||
g_eeGeneral.imperial = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_UNITS_SYSTEM, STR_VUNITSSYSTEM, g_eeGeneral.imperial, 0, 1, attr, event);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user