From ba2b7f8ec626f8539875ef3d6794afc9674e2121 Mon Sep 17 00:00:00 2001 From: wu58430 Date: Wed, 10 Jan 2024 19:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=A1=E9=81=93=E5=90=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/main.c | 7 +++++-- ui/menu.c | 24 +++++++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ui/main.c b/ui/main.c index b2753d7..2fdc73b 100644 --- a/ui/main.c +++ b/ui/main.c @@ -651,11 +651,14 @@ if (!gDTMF_InputMode) { } if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME) { +#if ENABLE_CHINESE_FULL==4 show_move_flag=1; +#endif UI_PrintStringSmall(String, 32, 0, line); } else { +#if ENABLE_CHINESE_FULL==4 show_move_flag=1; - +#endif UI_PrintStringSmall(String, 32 + 4, 0, line); // show the channel frequency below the channel number/name @@ -727,7 +730,7 @@ if (!gDTMF_InputMode) { #endif } if (Level) { -#if ENABLE_CHINESE_FULL==0 +#if ENABLE_CHINESE_FULL!=4 DrawSmallAntennaAndBars(p_line1 + LCD_WIDTH, Level); #else if(IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]) ) diff --git a/ui/menu.c b/ui/menu.c index c02d0b6..a7d91fa 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -726,8 +726,9 @@ void UI_DisplayMenu(void) { UI_PrintStringSmall(String, menu_item_x1 - 12, menu_item_x2, 5); } SETTINGS_FetchChannelName(String, gSubMenuSelection); +#if ENABLE_CHINESE_FULL==4 show_move_flag=1; - +#endif UI_PrintStringSmall(String[0] ? String : "--", menu_item_x1 - 12, menu_item_x2, 3); already_printed = true; break; @@ -781,15 +782,23 @@ void UI_DisplayMenu(void) { if (!gIsInSubMenu || edit_index < 0) { // show the channel name SETTINGS_FetchChannelName(String, gSubMenuSelection); char *pPrintStr = String[0] ? String : "--"; +#if ENABLE_CHINESE_FULL == 4 show_move_flag=1; +#endif UI_PrintStringSmall(pPrintStr, menu_item_x1 - 12, menu_item_x2, 3); - } else if (!CHINESE_JUDGE(tmp_name, strlen(tmp_name))) { // show the channel name being edited - UI_PrintStringSmall(edit, menu_item_x1 - 12, 0, 3); +#if ENABLE_CHINESE_FULL == 4 + + } else if (CHINESE_JUDGE(tmp_name, strlen(tmp_name))) { + edit_index = -1; + }else if (!CHINESE_JUDGE(tmp_name, strlen(tmp_name))) { // show the channel name being edited +#else + }else{ +#endif + + UI_PrintStringSmall(edit, menu_item_x1 - 12, menu_item_x2, 3); if (edit_index < MAX_EDIT_INDEX) - UI_PrintStringSmall("^", menu_item_x1 - 12 + (7 * edit_index), 0, 4); // show the cursor - } else if (CHINESE_JUDGE(tmp_name, strlen(tmp_name))) { - edit_index = -1; + UI_PrintStringSmall("^", menu_item_x1 - 12+7*edit_index+(((menu_item_x2 - menu_item_x1 + 12 ) - (7*MAX_EDIT_INDEX)) + 1) / 2 , 0, 4); // show the cursor } if (!gAskForConfirmation) { // show the frequency so that the user knows the channels frequency @@ -1072,8 +1081,9 @@ void UI_DisplayMenu(void) { // channel number UI_PrintStringSmall(pPrintStr, menu_item_x1 - 12, menu_item_x2, 2); +#if ENABLE_CHINESE_FULL==4 show_move_flag=1; - +#endif SETTINGS_FetchChannelName(String, gSubMenuSelection); pPrintStr = String[0] ? String : "--";