New ML support - fixed menu + resized reserved space
This commit is contained in:
parent
9ba49affc6
commit
f162fce7a7
2 changed files with 11 additions and 4 deletions
|
@ -29,7 +29,7 @@
|
||||||
//LANG - Multi-language support
|
//LANG - Multi-language support
|
||||||
//#define LANG_MODE 0 // primary language only
|
//#define LANG_MODE 0 // primary language only
|
||||||
#define LANG_MODE 1 // sec. language support
|
#define LANG_MODE 1 // sec. language support
|
||||||
#define LANG_SIZE_RESERVED 0x2700 // reserved space for secondary language (~10kb)
|
#define LANG_SIZE_RESERVED 0x2200 // reserved space for secondary language (~10kb)
|
||||||
//#define LANG_SIZE_RESERVED 0x1ef8 // reserved space for secondary language (~10kb)
|
//#define LANG_SIZE_RESERVED 0x1ef8 // reserved space for secondary language (~10kb)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3684,9 +3684,16 @@ static void lcd_language_menu()
|
||||||
START_MENU();
|
START_MENU();
|
||||||
if (lang_is_selected()) MENU_ITEM(back, _T(MSG_SETTINGS), 0);
|
if (lang_is_selected()) MENU_ITEM(back, _T(MSG_SETTINGS), 0);
|
||||||
MENU_ITEM(setlang, lang_get_name_by_code(lang_get_code(0)), 0);
|
MENU_ITEM(setlang, lang_get_name_by_code(lang_get_code(0)), 0);
|
||||||
// MENU_ITEM(setlang, lang_get_name_by_code(lang_get_code(1)), 1);
|
uint8_t cnt = lang_get_count();
|
||||||
for (int i = 2; i < lang_get_count(); i++) //skip seconday language - solved in lang_select
|
#ifdef W25X20CL
|
||||||
MENU_ITEM(setlang, lang_get_name_by_code(lang_get_code(i)), i);
|
if (cnt == 2) //display secondary language in case of clear xflash
|
||||||
|
MENU_ITEM(setlang, lang_get_name_by_code(lang_get_code(1)), 1);
|
||||||
|
else
|
||||||
|
for (int i = 2; i < cnt; i++) //skip seconday language - solved in lang_select
|
||||||
|
#else //W25X20CL
|
||||||
|
for (int i = 1; i < cnt; i++) //all seconday languages
|
||||||
|
#endif //W25X20CL
|
||||||
|
MENU_ITEM(setlang, lang_get_name_by_code(lang_get_code(i)), i);
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
#endif //(LANG_MODE != 0)
|
#endif //(LANG_MODE != 0)
|
||||||
|
|
Loading…
Reference in a new issue