From 89e7401955deb3b3fd940e63728cea59f9c46ea4 Mon Sep 17 00:00:00 2001 From: yuquanjun Date: Thu, 3 Sep 2026 11:58:08 +0800 Subject: [PATCH] Align mode pages to 0819 font sizes and four-key bottom nav. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply label/body/hero hierarchy (11/13/16), enlarge section digits to 13, and switch the bottom bar to 万能|普通|专业|设置 while keeping touch/key logic. Co-authored-by: Cursor --- Global/Global.c | 67 +++-- Global/Global.h | 2 +- UI/UI_Mixer.c | 24 +- UI/UI_Restore.c | 23 +- UI/UI_Setting.c | 29 ++- UI/UI_SongMode.c | 43 ++-- UI/UI_global.c | 143 +++++++---- UI/UI_global.h | 58 ++++- device/LCD_ILI9341/Drv_ILI9341_Lcd_App.c | 6 + .../LCD_ILI9341/Drv_ILI9341_Lcd_ChineseFont.h | 122 ++++++++++ .../LCD_ILI9341/Drv_ILI9341_Lcd_EnglishFont.h | 98 ++++++++ .../Drv_ILI9341_Lcd_Image_UI0902.c | 230 ++++++++++++++++++ .../Drv_ILI9341_Lcd_Image_UI0902.h | 4 + tools/gen_misans_font.py | 39 ++- 14 files changed, 743 insertions(+), 145 deletions(-) diff --git a/Global/Global.c b/Global/Global.c index 5fd9567..73bb35e 100644 --- a/Global/Global.c +++ b/Global/Global.c @@ -33,13 +33,26 @@ GUI_SWITCH ParamGuiData[] = const LEBEL_UI UI_Label[] = { - {13, 102, 48, 55, (const uint8_t*)"\xD2\xC6\xB5\xF7", LCD_ALIGN_CENTER, WHITE,BLACK,12, LCD_ALIGN_CENTER,WHITE,BLACK,16, GUI_TRANSPOSE}, - {126,101, 48, 55, (const uint8_t*)"\xCB\xD9\xB6\xC8", LCD_ALIGN_CENTER, WHITE,BLACK,12, LCD_ALIGN_CENTER,WHITE,BLACK,16, GUI_SPEED}, - {13, 215, 105,54, (const uint8_t*)"\xB8\xE8\xC7\xFA\xD1\xA1\xD2\xE9", LCD_ALIGN_LEFT,WHITE,BLACK,11,LCD_ALIGN_CENTER,WHITE,BLACK,13,GUI_MODE_PARAM}, - {13, 215, 164,46, (const uint8_t*)"\xCF\xD2\xD2\xF4\xC9\xAB\xD1\xA1\xD2\xE9",LCD_ALIGN_LEFT,WHITE,BLACK,11,LCD_ALIGN_CENTER,WHITE,BLACK,13,GUI_TIMBRE_SELECT}, - /* 0902/0819:演奏段落 — 与上一行拉开间距,避免顶边被盖住 */ - {13, 215, 218,50, (const uint8_t*)"\xD1\xDD\xD7\xE0\xB6\xCE\xC2\xE4",LCD_ALIGN_LEFT,WHITE,BLACK,11,LCD_ALIGN_CENTER,WHITE,BLACK,13,GUI_PLAY_SECTION}, -}; + /* 0819:移调/速度 标签11、主值16 */ + {UI0902_MARGIN_X, UI0902_CARD_W, UI0902_CARD_Y, UI0902_CARD_H, + (const uint8_t*)"\xD2\xC6\xB5\xF7", LCD_ALIGN_CENTER, WHITE,BLACK,UI0902_FONT_LABEL, + LCD_ALIGN_CENTER,WHITE,BLACK,UI0902_FONT_HERO, GUI_TRANSPOSE}, + {UI0902_MARGIN_X + UI0902_CARD_W + UI0902_CARD_GAP, UI0902_CARD_W, UI0902_CARD_Y, UI0902_CARD_H, + (const uint8_t*)"\xCB\xD9\xB6\xC8", LCD_ALIGN_CENTER, WHITE,BLACK,UI0902_FONT_LABEL, + LCD_ALIGN_CENTER,WHITE,BLACK,UI0902_FONT_HERO, GUI_SPEED}, + /* 0819:TAB/行标题11、曲目正文13 */ + {UI0902_MARGIN_X, UI0902_CONTENT_W, UI0902_MODE_Y, UI0902_MODE_H, + (const uint8_t*)"\xB8\xE8\xC7\xFA\xD1\xA1\xD2\xE9", LCD_ALIGN_LEFT,WHITE,BLACK,UI0902_FONT_LABEL, + LCD_ALIGN_CENTER,WHITE,BLACK,UI0902_FONT_BODY,GUI_MODE_PARAM}, + {UI0902_MARGIN_X, UI0902_CONTENT_W, UI0902_TIMBRE_Y, UI0902_TIMBRE_H, + (const uint8_t*)"\xCF\xD2\xD2\xF4\xC9\xAB\xD1\xA1\xD2\xE9",LCD_ALIGN_LEFT,WHITE,BLACK,UI0902_FONT_LABEL, + LCD_ALIGN_CENTER,WHITE,BLACK,UI0902_FONT_BODY,GUI_TIMBRE_SELECT}, + /* 0819:演奏段落 字号13 */ + {UI0902_MARGIN_X, UI0902_CONTENT_W, UI0902_SECTION_Y, UI0902_SECTION_H, + (const uint8_t*)"\xD1\xDD\xD7\xE0\xB6\xCE\xC2\xE4",LCD_ALIGN_LEFT,WHITE,BLACK,UI0902_FONT_BODY, + LCD_ALIGN_CENTER,WHITE,BLACK,UI0902_FONT_BODY,GUI_PLAY_SECTION}, +}; + // 4�����ӣ���ȫ�����ͼ���֣� @@ -53,32 +66,34 @@ Fader_t faders[4] = { const Touch_AreaTypeDef Touch_Areas[] = { - /* Xmin,Xmax,Ymin,Ymax, Flag, Value, ID, action — 坐标相对 240x320 */ - { 13, 64, 48, 102, -1, 0, GUI_TRANSPOSE, NULL }, - { 65, 114, 48, 102, 1, 0, GUI_TRANSPOSE, NULL }, + /* Xmin,Xmax,Ymin,Ymax, Flag, Value, ID, action — 与 UI_Label 网格同步 */ + { 12, 62, UI0902_CARD_Y, UI0902_CARD_Y + UI0902_CARD_H - 1, -1, 0, GUI_TRANSPOSE, NULL }, + { 63, 113, UI0902_CARD_Y, UI0902_CARD_Y + UI0902_CARD_H - 1, 1, 0, GUI_TRANSPOSE, NULL }, - { 126, 176, 48, 102, -1, 0, GUI_SPEED, NULL }, - { 177, 226, 48, 102, 1, 0, GUI_SPEED, NULL }, + { 126, 176, UI0902_CARD_Y, UI0902_CARD_Y + UI0902_CARD_H - 1, -1, 0, GUI_SPEED, NULL }, + { 177, 227, UI0902_CARD_Y, UI0902_CARD_Y + UI0902_CARD_H - 1, 1, 0, GUI_SPEED, NULL }, - { 12, 79, 100, 129, 0, 0, GUI_AUTOBAND_SW, NULL }, - { 84, 151, 100, 129, 0, 1, GUI_AUTOBAND_SW, NULL }, + /* 节奏类型 / 本地曲目 TAB */ + { 12, 67, UI0902_MODE_Y + 1, UI0902_MODE_Y + UI0902_TAB_H, 0, 0, GUI_AUTOBAND_SW, NULL }, + { 74, 129, UI0902_MODE_Y + 1, UI0902_MODE_Y + UI0902_TAB_H, 0, 1, GUI_AUTOBAND_SW, NULL }, - { 13, 120, 132, 166, -1, 0, GUI_MODE_PARAM, NULL }, - { 121, 227, 132, 166, 1, 0, GUI_MODE_PARAM, NULL }, + { 13, 120, UI0902_MODE_Y + 25, UI0902_MODE_Y + UI0902_MODE_H - 1, -1, 0, GUI_MODE_PARAM, NULL }, + { 121, 227, UI0902_MODE_Y + 25, UI0902_MODE_Y + UI0902_MODE_H - 1, 1, 0, GUI_MODE_PARAM, NULL }, - { 13, 120, 172, 214, -1, 0, GUI_TIMBRE_SELECT, NULL }, - { 121, 227, 172, 214, 1, 0, GUI_TIMBRE_SELECT, NULL }, + { 13, 120, UI0902_TIMBRE_Y + 20, UI0902_TIMBRE_Y + UI0902_TIMBRE_H - 1, -1, 0, GUI_TIMBRE_SELECT, NULL }, + { 121, 227, UI0902_TIMBRE_Y + 20, UI0902_TIMBRE_Y + UI0902_TIMBRE_H - 1, 1, 0, GUI_TIMBRE_SELECT, NULL }, /* 演奏段落 1~4 */ - { 12, 58, 232, 272, 0, 0, GUI_PLAY_SECTION, NULL }, - { 69, 114, 232, 272, 0, 1, GUI_PLAY_SECTION, NULL }, - { 125, 171, 232, 272, 0, 2, GUI_PLAY_SECTION, NULL }, - { 182, 228, 232, 272, 0, 3, GUI_PLAY_SECTION, NULL }, + { 12, 58, UI0902_SECTION_Y + 16, UI0902_SECTION_Y + 16 + UI0902_SECTION_BTN_H - 1, 0, 0, GUI_PLAY_SECTION, NULL }, + { 66, 112, UI0902_SECTION_Y + 16, UI0902_SECTION_Y + 16 + UI0902_SECTION_BTN_H - 1, 0, 1, GUI_PLAY_SECTION, NULL }, + { 120, 166, UI0902_SECTION_Y + 16, UI0902_SECTION_Y + 16 + UI0902_SECTION_BTN_H - 1, 0, 2, GUI_PLAY_SECTION, NULL }, + { 174, 220, UI0902_SECTION_Y + 16, UI0902_SECTION_Y + 16 + UI0902_SECTION_BTN_H - 1, 0, 3, GUI_PLAY_SECTION, NULL }, - /* 底栏 TAB:万能/普通/专业/设置(Value=目标 TAB) */ - { 0, 79, 280, 319, 0, 0, GUI_NAV_BAR, NULL }, - { 80, 159, 280, 319, 0, 1, GUI_NAV_BAR, NULL }, - { 160, 239, 280, 319, 0, 2, GUI_NAV_BAR, NULL }, + /* 底栏四键:万能 | 普通 | 专业 | 设置 */ + { 0, 59, 280, 319, 0, UI0902_NAV_UNIVERSAL, GUI_NAV_BAR, NULL }, + { 60, 119, 280, 319, 0, UI0902_NAV_NORMAL, GUI_NAV_BAR, NULL }, + { 120, 179, 280, 319, 0, UI0902_NAV_EXPERT, GUI_NAV_BAR, NULL }, + { 180, 239, 280, 319, 0, UI0902_NAV_SETTING, GUI_NAV_BAR, NULL }, }; int16_t MIC_VOL_MAP[10]= {-9000,-7000,-5000,-3000,-1000,1000,3000,5000,7000,9000}; diff --git a/Global/Global.h b/Global/Global.h index 4693e6b..368d4e1 100644 --- a/Global/Global.h +++ b/Global/Global.h @@ -112,7 +112,7 @@ typedef enum { GUI_AUTOBAND_SW, GUI_BL_SW, GUI_TAB_LAST_INDEX, - GUI_NAV_BAR, /* 0902 底栏导航:Value 0=设置/返回 1=调音台 2=模式选择 */ + GUI_NAV_BAR, /* 0902 底栏:Value 0万能 1普通 2专业 3设置 */ }GUIID; diff --git a/UI/UI_Mixer.c b/UI/UI_Mixer.c index c3bf3f5..848d8c1 100644 --- a/UI/UI_Mixer.c +++ b/UI/UI_Mixer.c @@ -4,14 +4,15 @@ static int8_t s_mixer_focus = -1; /* ???????????????????? / ?????(???) / ????? */ const Touch_AreaTypeDef Touch_Mixer_Areas[] = { - { 0, 79, 280, 319, 0, UI0902_NAV_SETTING, GUI_NAV_BAR, NULL }, - { 80, 159, 280, 319, 0, UI0902_NAV_MIXER, GUI_NAV_BAR, NULL }, - { 160, 239, 280, 319, 0, UI0902_NAV_MODE, GUI_NAV_BAR, NULL }, + { 0, 59, 280, 319, 0, UI0902_NAV_UNIVERSAL, GUI_NAV_BAR, NULL }, + { 60, 119, 280, 319, 0, UI0902_NAV_NORMAL, GUI_NAV_BAR, NULL }, + { 120, 179, 280, 319, 0, UI0902_NAV_EXPERT, GUI_NAV_BAR, NULL }, + { 180, 239, 280, 319, 0, UI0902_NAV_SETTING, GUI_NAV_BAR, NULL }, }; #define TOUCH_BTN_NUM (sizeof(Touch_Mixer_Areas)/sizeof(Touch_AreaTypeDef)) -/* ???????????????? Flash ??????id0 ???? id1 ???? id2 MIC id3 ?????? */ +/* ?????????????????? Flash ??????id0 ???? id1 ???? id2 MIC id3 ???????? */ static const uint32_t s_fader_label[4][3] = { /* addr, w, h */ { UI0902_TXT_MIXER_BAND_ADDR, UI0902_TXT_MIXER_BAND_W, UI0902_TXT_MIXER_BAND_H }, { UI0902_TXT_MIXER_GUITAR_ADDR, UI0902_TXT_MIXER_GUITAR_W, UI0902_TXT_MIXER_GUITAR_H }, @@ -20,7 +21,7 @@ static const uint32_t s_fader_label[4][3] = { /* addr, w, h */ }; // ============================================================ -// ??????????????????? / ??????????? +// ????????????????????? / ????????????? // ============================================================ void DrawFader(Fader_t *f) { @@ -86,7 +87,7 @@ static void DrawFaderSlider(Fader_t *f, uint16_t slider_y) } // ============================================================ -// ?????????????????????????????? Flash ???? +// ???????????????????????????????????? Flash ???? // ============================================================ static void UpdateFaderSlider(Fader_t *f) { @@ -194,7 +195,7 @@ void UI_Mixer_Init(void) LCD_ShowChinese_AutoAlign(0, 240, 8, (uint8_t*)"\xB5\xF7\xD2\xF4\xCC\xA8", LCD_ALIGN_CENTER, WHITE, UI0902_BG_COLOR, 0, 16); DrawAllFaders(); - Draw_Bottom_Bar(UI0902_NAV_MIXER, 0); + Draw_Bottom_Bar(UI0902_NAV_NONE, 0); pCurrentTouch_Area = Touch_Mixer_Areas; } @@ -225,9 +226,12 @@ void UI_Mixer_Process(DisplayTaskMessage_Type msg) { switch (Touch_Mixer_Areas[i].Value) { - case UI0902_NAV_SETTING: MenuPage_Setting_Proc(); break; - case UI0902_NAV_MIXER: break; /* ??? */ - case UI0902_NAV_MODE: UI_ReturnToModeSelect(); break; + case UI0902_NAV_UNIVERSAL: + case UI0902_NAV_NORMAL: + case UI0902_NAV_EXPERT: + case UI0902_NAV_SETTING: + UI_NavBar_Action(Touch_Mixer_Areas[i].Value); + break; default: break; } break; diff --git a/UI/UI_Restore.c b/UI/UI_Restore.c index 9dc644f..de9a54a 100644 --- a/UI/UI_Restore.c +++ b/UI/UI_Restore.c @@ -1,18 +1,19 @@ #include "includes.h" /* ============================== - * 0902 ָȷҳ + ʾ + ȷ/ȡť + + * 0902 ????????????????? + ????? + ???/?????? + ???? * ============================== */ extern const Touch_AreaTypeDef *pCurrentTouch_Area; const Touch_AreaTypeDef Touch_Restore_Areas[] = { // Xmin, Xmax, Ymin, Ymax, flag, Value, ID, action - { 13, 119, 185, 241, 0, 0, 1, NULL }, /* ȷ */ - { 121, 227, 185, 241, 0, 0, 2, NULL }, /* ȡ */ - { 0, 79, 280, 319, 0, 0, 0, NULL }, /* */ - { 80, 159, 280, 319, 0, 1, GUI_NAV_BAR, NULL }, /* ̨ */ - { 160, 239, 280, 319, 0, 2, GUI_NAV_BAR, NULL }, /* ģʽѡ */ + { 13, 119, 185, 241, 0, 0, 1, NULL }, /* ??? */ + { 121, 227, 185, 241, 0, 0, 2, NULL }, /* ??? */ + { 0, 59, 280, 319, 0, UI0902_NAV_UNIVERSAL, GUI_NAV_BAR, NULL }, + { 60, 119, 280, 319, 0, UI0902_NAV_NORMAL, GUI_NAV_BAR, NULL }, + { 120, 179, 280, 319, 0, UI0902_NAV_EXPERT, GUI_NAV_BAR, NULL }, + { 180, 239, 280, 319, 0, UI0902_NAV_SETTING, GUI_NAV_BAR, NULL }, }; #define TOUCH_AREA_RESTORE_NUM (sizeof(Touch_Restore_Areas)/sizeof(Touch_AreaTypeDef)) @@ -26,7 +27,7 @@ void UI_Restore_Select_Init(void) LCD_ShowChinese_AutoAlign(0, 240, 140, (uint8_t*)"\xC7\xE5\xB3\xFD\xB2\xA2\xD6\xD8\xC6\xF4\xA1\xA3", LCD_ALIGN_CENTER, WHITE, UI0902_BG_COLOR, 0, 12); LCD_WR_PIC_FROM_FLASH_Trans(13, 185, 106, 56, UI0902_BTN_CONFIRM_BIG_ADDR); LCD_WR_PIC_FROM_FLASH_Trans(121, 185, 106, 56, UI0902_BTN_CANCEL_BIG_ADDR); - Draw_Bottom_Bar(UI0902_NAV_NONE, 1); + Draw_Bottom_Bar(UI0902_NAV_SETTING, 0); pCurrentTouch_Area = Touch_Restore_Areas; } @@ -44,10 +45,10 @@ void UI_Restore_Select_Process(DisplayTaskMessage_Type msg) { if (pCurrentTouch_Area[k].ID == GUI_NAV_BAR) { - if (pCurrentTouch_Area[k].Value == UI0902_NAV_MIXER) - MenuPage_Mixer_Proc(); - else if (pCurrentTouch_Area[k].Value == UI0902_NAV_MODE) - UI_ReturnToModeSelect(); + if (pCurrentTouch_Area[k].Value == UI0902_NAV_SETTING) + MenuPage_Setting_Proc(); + else + UI_NavBar_Action(pCurrentTouch_Area[k].Value); } else { diff --git a/UI/UI_Setting.c b/UI/UI_Setting.c index 4073f49..c64edb1 100644 --- a/UI/UI_Setting.c +++ b/UI/UI_Setting.c @@ -1,7 +1,7 @@ #include "includes.h" /* ============================== - * 0902 ??????????? / ???????? / ?????? / ??????? + * 0902 ????????????? / ???????? / ?????? / ??????? * ?? 214x40????????? 50???????????? / ????? / ????? * ============================== */ #define SET_ROW_X 13 @@ -14,15 +14,16 @@ extern const Touch_AreaTypeDef *pCurrentTouch_Area; const Touch_AreaTypeDef Touch_SystemSetting_Areas[] = { - /* ??? / ????????????????? Flag -1/+1?????? */ + /* ??? / ????????????????? Flag -1/+1???????? */ { 13, 119, SET_ROW_Y0 + SET_ROW_PITCH, SET_ROW_Y0 + SET_ROW_PITCH + SET_ROW_H - 1, -1, 0, GUI_BLUETOOTH_SW, NULL }, { 120, 227, SET_ROW_Y0 + SET_ROW_PITCH, SET_ROW_Y0 + SET_ROW_PITCH + SET_ROW_H - 1, 1, 0, GUI_BLUETOOTH_SW, NULL }, { 13, 119, SET_ROW_Y0 + SET_ROW_PITCH * 2, SET_ROW_Y0 + SET_ROW_PITCH * 2 + SET_ROW_H - 1, -1, 0, GUI_AUTOCLOSE, NULL }, { 120, 227, SET_ROW_Y0 + SET_ROW_PITCH * 2, SET_ROW_Y0 + SET_ROW_PITCH * 2 + SET_ROW_H - 1, 1, 0, GUI_AUTOCLOSE, NULL }, { 13, 227, SET_ROW_Y0 + SET_ROW_PITCH * 3, SET_ROW_Y0 + SET_ROW_PITCH * 3 + SET_ROW_H - 1, 0, 0, GUI_RESTORE, NULL }, - { 0, 79, 280, 319, 0, UI0902_NAV_SETTING, GUI_NAV_BAR, NULL }, - { 80, 159, 280, 319, 0, UI0902_NAV_MIXER, GUI_NAV_BAR, NULL }, - { 160, 239, 280, 319, 0, UI0902_NAV_MODE, GUI_NAV_BAR, NULL }, + { 0, 59, 280, 319, 0, UI0902_NAV_UNIVERSAL, GUI_NAV_BAR, NULL }, + { 60, 119, 280, 319, 0, UI0902_NAV_NORMAL, GUI_NAV_BAR, NULL }, + { 120, 179, 280, 319, 0, UI0902_NAV_EXPERT, GUI_NAV_BAR, NULL }, + { 180, 239, 280, 319, 0, UI0902_NAV_SETTING, GUI_NAV_BAR, NULL }, }; #define TOUCH_AREA_SYSTEMSETTING_NUM (sizeof(Touch_SystemSetting_Areas)/sizeof(Touch_AreaTypeDef)) @@ -36,9 +37,9 @@ GUI_SWITCH mGuiData_SystemSETTING[] = { LEBEL_UI SystemSetting[] = { - /* ???? */ + /* ?????? */ {SET_ROW_X, SET_ROW_W, SET_ROW_Y0, SET_ROW_H, (const uint8_t*)"\xB9\xCC\xBC\xFE\xB0\xE6\xB1\xBE", LCD_ALIGN_LEFT, WHITE, BLACK, 13, LCD_ALIGN_CENTER, WHITE, BLACK, 11, GUI_VERSION}, - /* ??????????????????????????????????????????????????????? */ + /* ????????????????????????????????????????????????????????????? */ {SET_ROW_X, SET_ROW_W, SET_ROW_Y0 + SET_ROW_PITCH, SET_ROW_H, (const uint8_t*)"\xC0\xB6\xD1\xC0\xC1\xAC\xBD\xD3", LCD_ALIGN_LEFT, WHITE, BLACK, 13, LCD_ALIGN_CENTER, WHITE, BLACK, 11, GUI_BLUETOOTH_SW}, {SET_ROW_X, SET_ROW_W, SET_ROW_Y0 + SET_ROW_PITCH*2, SET_ROW_H, (const uint8_t*)"\xD7\xD4\xB6\xAF\xB9\xD8\xBB\xFA", LCD_ALIGN_LEFT, WHITE, BLACK, 13, LCD_ALIGN_CENTER, WHITE, BLACK, 11, GUI_AUTOCLOSE}, {SET_ROW_X, SET_ROW_W, SET_ROW_Y0 + SET_ROW_PITCH*3, SET_ROW_H, (const uint8_t*)"\xBB\xD6\xB8\xB4\xB3\xF6\xB3\xA7\xC9\xE8\xD6\xC3", LCD_ALIGN_LEFT, WHITE, BLACK, 13, LCD_ALIGN_CENTER, WHITE, BLACK, 11, GUI_RESTORE}, @@ -59,13 +60,11 @@ void Touch_SystemSettingAction(int8_t FLAG, uint8_t ID, uint8_t areaIndex, uint8 if (ID == GUI_NAV_BAR) { - switch (value) - { - case UI0902_NAV_SETTING: UI_GotoCurrentModePage(); break; - case UI0902_NAV_MIXER: MenuPage_Mixer_Proc(); break; - case UI0902_NAV_MODE: UI_ReturnToModeSelect(); break; - default: break; - } + /* ????????????????????????????????????? */ + if (value == UI0902_NAV_SETTING) + UI_GotoCurrentModePage(); + else + UI_NavBar_Action(value); return; } @@ -100,7 +99,7 @@ void UI_Setting_Init(void) /* ?????? */ LCD_ShowChinese_AutoAlign(0, 240, 8, (const uint8_t*)"\xCF\xB5\xCD\xB3\xC9\xE8\xD6\xC3", LCD_ALIGN_CENTER, WHITE, UI0902_BG_COLOR, 0, 16); DrawSystemSetting(); - Draw_Bottom_Bar(UI0902_NAV_NONE, 1); + Draw_Bottom_Bar(UI0902_NAV_SETTING, 0); pCurrentTouch_Area = Touch_SystemSetting_Areas; } diff --git a/UI/UI_SongMode.c b/UI/UI_SongMode.c index 0434dd9..c1df6fc 100644 --- a/UI/UI_SongMode.c +++ b/UI/UI_SongMode.c @@ -7,44 +7,47 @@ static uint8_t Speed[6] = {0xF0, 0x51, 0x03, 0x00, 0x00, 0xF7}; void Draw_Tab_Mode_Menu(const LEBEL_UI *UI, GUI_SWITCH *Group) { - /* 四字 TAB:用 12 号(字库齐全)+ 加宽,避免缺字/裁切 */ - const uint16_t tab_w = 68; - const uint16_t tab_h = 22; - const uint8_t tab_r = 6; - const uint8_t tab_font = 12; - const uint16_t start_x = 12; + /* 0819:TAB 字号 11;0902:紧凑圆角条,选中常亮蓝 */ + const uint16_t tab_w = UI0902_TAB_W; + const uint16_t tab_h = UI0902_TAB_H; + const uint8_t tab_r = UI0902_RADIUS_TAB; + const uint8_t tab_font = UI0902_FONT_LABEL; + const uint16_t start_x = UI0902_MARGIN_X; const uint16_t start_y = UI->y + 1; + const uint16_t gap = 6; const uint16_t text_y = start_y + (tab_h - tab_font) / 2; - const uint16_t inset = 6; + const uint16_t inset = 4; uint16_t color_sel_bg = COLOR_GRAD_MID; - uint16_t color_unsel_bg = COLOR_NORMAL_BG; + uint16_t color_unsel_bg = UI0902_ROW_BG; uint16_t color_text = UI->Text_fc; + uint16_t x1 = start_x; + uint16_t x2 = start_x + tab_w + gap; if(Group->Current == 1) { - LCD_FillRoundRect(start_x, start_y, tab_w, tab_h, tab_r, color_unsel_bg); - LCD_FillRoundRect(start_x+tab_w +4, start_y, tab_w, tab_h, tab_r, color_sel_bg); + LCD_FillRoundRect(x1, start_y, tab_w, tab_h, tab_r, color_unsel_bg); + LCD_FillRoundRect(x2, start_y, tab_w, tab_h, tab_r, color_sel_bg); LCD_ShowChinese_AutoAlign( - start_x + inset, start_x + tab_w - inset, text_y, + x1 + inset, x1 + tab_w - inset, text_y, (const uint8_t*)"\xBD\xDA\xD7\xE0\xC0\xE0\xD0\xCD", LCD_ALIGN_CENTER, color_text, color_unsel_bg, 0, tab_font); LCD_ShowChinese_AutoAlign( - start_x + tab_w + 4 + inset, start_x + tab_w + 4 + tab_w - inset, text_y, + x2 + inset, x2 + tab_w - inset, text_y, (const uint8_t *)"\xB1\xBE\xB5\xD8\xC7\xFA\xC4\xBF", LCD_ALIGN_CENTER, color_text, color_sel_bg, 0, tab_font); } else { - LCD_FillRoundRect(start_x, start_y, tab_w, tab_h, tab_r, color_sel_bg); - LCD_FillRoundRect(start_x+tab_w +4, start_y, tab_w, tab_h, tab_r, color_unsel_bg); + LCD_FillRoundRect(x1, start_y, tab_w, tab_h, tab_r, color_sel_bg); + LCD_FillRoundRect(x2, start_y, tab_w, tab_h, tab_r, color_unsel_bg); LCD_ShowChinese_AutoAlign( - start_x + inset, start_x + tab_w - inset, text_y, + x1 + inset, x1 + tab_w - inset, text_y, (const uint8_t*)"\xBD\xDA\xD7\xE0\xC0\xE0\xD0\xCD", LCD_ALIGN_CENTER, color_text, color_sel_bg, 0, tab_font); LCD_ShowChinese_AutoAlign( - start_x + tab_w + 4 + inset, start_x + tab_w + 4 + tab_w - inset, text_y, + x2 + inset, x2 + tab_w - inset, text_y, (const uint8_t *)"\xB1\xBE\xB5\xD8\xC7\xFA\xC4\xBF", LCD_ALIGN_CENTER, color_text, color_unsel_bg, 0, tab_font); } @@ -248,13 +251,7 @@ void Touch_Action(int8_t FLAG, uint8_t ID, uint8_t areaIndex,uint8_t value) } else if(ID == GUI_NAV_BAR) { - switch(value) - { - case UI0902_NAV_SETTING: MenuPage_Setting_Proc(); break; - case UI0902_NAV_MIXER: MenuPage_Mixer_Proc(); break; - case UI0902_NAV_MODE: UI_ReturnToModeSelect(); break; - default: break; - } + UI_NavBar_Action(value); return; } else if(ID==GUI_TAB_INDEX) diff --git a/UI/UI_global.c b/UI/UI_global.c index b5ccfb4..c41ebe1 100644 --- a/UI/UI_global.c +++ b/UI/UI_global.c @@ -476,7 +476,7 @@ void label_Tranzpose_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) { uint8_t Textstr[20] = {0}; uint16_t c_top, c_bot; - uint16_t chev_cy = UI->y + UI->h - 12; /* < > 纵向中心 */ + uint16_t chev_cy = UI->y + UI->h - 14; /* < > 纵向中心 */ UI_GetFocusGrad(UI->Id, &c_top, &c_bot); LCD_FillRoundRectGradient( @@ -484,14 +484,14 @@ void label_Tranzpose_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) UI->y, UI->w, UI->h, - 10, + UI0902_RADIUS_CARD, c_top, c_bot ); LCD_ShowChinese_AutoAlign_Gradient( UI->x, UI->x+UI->w, - UI->y+5, + UI->y+6, UI->p, UI->Tab_Align, UI->Tab_fc, @@ -505,7 +505,7 @@ void label_Tranzpose_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) LCD_ShowString_AutoAlign_Gradient( UI->x, UI->x+UI->w, - UI->y + 17, + UI->y + 20, Textstr, UI->Text_Align, UI->Text_fc, @@ -516,13 +516,13 @@ void label_Tranzpose_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) LCD_ShowString_AutoAlign_Gradient( UI->x, UI->x+UI->w, - UI->y + 17+21, + UI->y + 20 + UI->Text_size + 4, (const uint8_t*)"KEY", UI->Text_Align, UI->Text_fc, c_top, c_bot, - 12 + UI0902_FONT_SUB ); } void label_Speed_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) @@ -535,13 +535,13 @@ void label_Speed_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) UI->y, UI->w, UI->h, - 10, + UI0902_RADIUS_CARD, c_top, c_bot ); LCD_ShowChinese_AutoAlign_Gradient( UI->x, UI->x+UI->w, - UI->y+5, + UI->y+6, UI->p, UI->Tab_Align, UI->Tab_fc, @@ -549,18 +549,19 @@ void label_Speed_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) c_bot, UI->Tab_size ); - LCD_WR_PIC_FROM_FLASH_Trans(UI->x + 5, UI->y + UI->h - 22, - UI0902_BTN_MINUS_GRAY_W, UI0902_BTN_MINUS_GRAY_H, - UI0902_BTN_MINUS_GRAY_ADDR); - LCD_WR_PIC_FROM_FLASH_Trans(UI->x + UI->w - 5 - UI0902_BTN_PLUS_GRAY_W, - UI->y + UI->h - 22, - UI0902_BTN_PLUS_GRAY_W, UI0902_BTN_PLUS_GRAY_H, - UI0902_BTN_PLUS_GRAY_ADDR); + /* 0903:速度 −/+ 素材 */ + LCD_WR_PIC_Trans(UI->x + 6, UI->y + UI->h - 8 - UI0902_BTN_MINUS_H, + UI0902_BTN_MINUS_W, UI0902_BTN_MINUS_H, + gImage_UI0902_BtnMinus_23x22, BLACK); + LCD_WR_PIC_Trans(UI->x + UI->w - 6 - UI0902_BTN_PLUS_W, + UI->y + UI->h - 8 - UI0902_BTN_PLUS_H, + UI0902_BTN_PLUS_W, UI0902_BTN_PLUS_H, + gImage_UI0902_BtnPlus_23x22, BLACK); GET_Num_Str(mGuiData[UI->Id].Current, 0, (char*)Textstr, UI->Id); LCD_ShowString_AutoAlign_Gradient( UI->x, UI->x+UI->w, - UI->y + 17, + UI->y + 20, Textstr, UI->Text_Align, UI->Text_fc, @@ -571,13 +572,13 @@ void label_Speed_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) LCD_ShowString_AutoAlign_Gradient( UI->x, UI->x+UI->w, - UI->y + 17+21, + UI->y + 20 + UI->Text_size + 4, (const uint8_t*)"BPM", UI->Text_Align, UI->Text_fc, c_top, c_bot, - 12 + UI0902_FONT_SUB ); } // �޸��棺ȥ������д���autobandֵ��ֻ������ȷ�IJ�����ʾ @@ -593,7 +594,7 @@ void label_ModeSelece_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) case 1: paramCurData = &ParamGuiData[EXPRESS_MODE_PARAM]; break; case 2: paramCurData = &ParamGuiData[ALL_MODE_PARAM]; break; } - LCD_FillRoundRectGradient(UI->x, UI->y+20+5, UI->w, UI->h-20, 10, c_top, c_bot); + LCD_FillRoundRectGradient(UI->x, UI->y+20+5, UI->w, UI->h-20, UI0902_RADIUS_CARD, c_top, c_bot); switch(mGuiData[GUI_TAB_INDEX].Current) { case 0:case 1: Draw_Tab_Mode_Menu(UI, &mGuiData[GUI_AUTOBAND_SW]); @@ -620,24 +621,25 @@ void label_ModeSelece_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) case 2: paramCurData = &ParamGuiData[ALL_MODE_PARAM]; break; } show_Param(&UI_Label[GUI_MODE_PARAM], paramCurData); - LCD_DrawChevron_Left(UI->x + 15, UI->y + 40, 7, 2, WHITE); - LCD_DrawChevron_Right(UI->x + UI->w - 15, UI->y + 40, 7, 2, WHITE); + LCD_DrawChevron_Left(UI->x + 15, UI->y + 25 + (UI->h - 25) / 2, 7, 2, WHITE); + LCD_DrawChevron_Right(UI->x + UI->w - 15, UI->y + 25 + (UI->h - 25) / 2, 7, 2, WHITE); } void label_TimbreSelece_ui(const LEBEL_UI *UI, GUI_SWITCH * Group) { uint8_t Textstr[20] = {0}; char NumBuf[8] = {0}; - uint16_t text_y = UI->y + 25; + uint16_t text_y = UI->y + 22 + ((UI->h > 40) ? ((UI->h - 22 - UI->Text_size) / 2) : 3); uint8_t idx = mGuiData[UI->Id].Current + 1; uint16_t c_top, c_bot; + uint16_t chev_cy = UI->y + 22 + (UI->h - 22) / 2; UI_GetFocusGrad(UI->Id, &c_top, &c_bot); LCD_FillRoundRectGradient( UI->x, UI->y+20, UI->w, UI->h-20, - 10, + UI0902_RADIUS_CARD, c_top, c_bot ); LCD_ShowChinese_AutoAlign( @@ -651,8 +653,8 @@ void label_TimbreSelece_ui(const LEBEL_UI *UI, GUI_SWITCH * Group) 1, UI->Tab_size ); - LCD_DrawChevron_Left(UI->x + 15, UI->y + 35, 7, 2, WHITE); - LCD_DrawChevron_Right(UI->x + UI->w - 15, UI->y + 35, 7, 2, WHITE); + LCD_DrawChevron_Left(UI->x + 15, chev_cy, 7, 2, WHITE); + LCD_DrawChevron_Right(UI->x + UI->w - 15, chev_cy, 7, 2, WHITE); LCD_FillRoundRectGradient( UI->x + 40, UI->y+20, @@ -667,7 +669,7 @@ void label_TimbreSelece_ui(const LEBEL_UI *UI, GUI_SWITCH * Group) uint32_t chinese_start_x = LCD_ShowChinese_AutoAlign_Gradient( UI->x + num_w, UI->x + UI->w, - text_y+3, + text_y, (const uint8_t*)Textstr, UI->Text_Align, UI->Text_fc, @@ -675,7 +677,7 @@ void label_TimbreSelece_ui(const LEBEL_UI *UI, GUI_SWITCH * Group) UI->Text_size ); uint16_t num_x = chinese_start_x - num_w - 5; - LCD_ShowString_AutoAlign_Gradient(num_x, num_x + num_w, text_y+3, + LCD_ShowString_AutoAlign_Gradient(num_x, num_x + num_w, text_y, (const uint8_t *)NumBuf, LCD_ALIGN_LEFT, UI->Text_fc, c_top, c_bot, UI->Text_size); switch(Group->Id) @@ -707,52 +709,91 @@ void label_PlaySection_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) void Draw_Bottom_Bar(uint8_t sel, uint8_t first_back) { - const uint8_t *icon0; - const uint8_t *icon1; - const uint8_t *icon2; - uint8_t w0, w1, w2, h0, h1, h2; + /* 需求稿四键:万能 | 普通 | 专业 | 设置;first_back 时设置位仍高亮(返回用触控逻辑) */ + const uint8_t *icons[4]; + uint8_t ws[4], hs[4]; + const uint16_t cx[4] = { 30, 90, 150, 210 }; + uint8_t i; + (void)first_back; LCD_FillByColor(0, 275, 240, 320, UI0902_BG_COLOR); - if (first_back) { icon0 = gImage_UI0902_TabBack_Not_18x28; w0 = 18; h0 = 28; } - else if (sel == 0) { icon0 = gImage_UI0902_TabSetting_Sel_36x28; w0 = 36; h0 = 28; } - else { icon0 = gImage_UI0902_TabSetting_Not_35x28; w0 = 35; h0 = 28; } + if (sel == UI0902_NAV_UNIVERSAL) { icons[0] = gImage_Nav_Universal_Sel; ws[0] = 36; hs[0] = 28; } + else { icons[0] = gImage_Nav_Universal_Not; ws[0] = 36; hs[0] = 28; } - if (sel == 1) { icon1 = gImage_UI0902_TabMixer_Sel_35x27; w1 = 35; h1 = 27; } - else { icon1 = gImage_UI0902_TabMixer_Not_35x28; w1 = 35; h1 = 28; } + if (sel == UI0902_NAV_NORMAL) { icons[1] = gImage_Nav_Normal_Sel; ws[1] = 35; hs[1] = 29; } + else { icons[1] = gImage_Nav_Normal_Not; ws[1] = 35; hs[1] = 28; } - if (sel == 2) { icon2 = gImage_UI0902_TabMode_Sel_36x28; w2 = 36; h2 = 28; } - else { icon2 = gImage_UI0902_TabMode_Not_35x29; w2 = 35; h2 = 29; } + if (sel == UI0902_NAV_EXPERT) { icons[2] = gImage_Nav_Expert_Sel; ws[2] = 35; hs[2] = 27; } + else { icons[2] = gImage_Nav_Expert_Not; ws[2] = 35; hs[2] = 27; } - LCD_WR_PIC_Trans(40 - w0 / 2, 283, w0, h0, icon0, BLACK); - LCD_WR_PIC_Trans(120 - w1 / 2, 283, w1, h1, icon1, BLACK); - LCD_WR_PIC_Trans(200 - w2 / 2, 283, w2, h2, icon2, BLACK); + if (sel == UI0902_NAV_SETTING) { icons[3] = gImage_Nav_Setting_Sel; ws[3] = 18; hs[3] = 28; } + else { icons[3] = gImage_Nav_Setting_Not; ws[3] = 18; hs[3] = 28; } + + for (i = 0; i < 4; i++) + { + LCD_WR_PIC_Trans(cx[i] - ws[i] / 2, 283, ws[i], hs[i], icons[i], BLACK); + } +} + +void UI_NavBar_Action(uint8_t value) +{ + switch (value) + { + case UI0902_NAV_UNIVERSAL: + ADDRESS = mGuiData[GUI_AUTOBAND_SW].Current ? 0x0009EB5F : 0x0001B8F0; + MenuPage_SongMode_Proc(); + break; + case UI0902_NAV_NORMAL: + ADDRESS = 0x0009598F; + MenuPage_FreeMode_Proc(); + break; + case UI0902_NAV_EXPERT: + ADDRESS = mGuiData[GUI_AUTOBAND_SW].Current ? 0x0009EB5F : 0x00000000; + MenuPage_ExpertMode_Proc(); + break; + case UI0902_NAV_SETTING: + MenuPage_Setting_Proc(); + break; + default: + break; + } } void label_Tab_Select_ui(const LEBEL_UI *UI,GUI_SWITCH * Group) { + uint8_t sel = UI0902_NAV_NONE; (void)UI; (void)Group; - Draw_Bottom_Bar(UI0902_NAV_NONE, 0); + /* GUI_TAB_INDEX:0万能 1专业 2普通 */ + switch (mGuiData[GUI_TAB_INDEX].Current) + { + case 0: sel = UI0902_NAV_UNIVERSAL; break; + case 1: sel = UI0902_NAV_EXPERT; break; + case 2: sel = UI0902_NAV_NORMAL; break; + default: break; + } + Draw_Bottom_Bar(sel, 0); } void Draw_Tab_Section_Menu(const LEBEL_UI *UI, TAB_SECTION_INDEX select_tab) { - const uint16_t tab_w = 47; - const uint16_t tab_h = 34; - const uint8_t tab_r = 5; - const uint8_t pitch = 57; - const uint16_t start_x = 12; - const uint16_t start_y = UI->y + 22; - const uint16_t text_y = start_y + 11; + const uint16_t tab_w = UI0902_SECTION_BTN_W; + const uint16_t tab_h = UI0902_SECTION_BTN_H; + const uint8_t tab_r = UI0902_RADIUS_BTN; + const uint8_t pitch = UI0902_SECTION_PITCH; + const uint16_t start_x = UI0902_MARGIN_X; + const uint16_t start_y = UI->y + 16; + /* 0819:演奏段落数字与标题同为 13 */ + const uint16_t text_y = start_y + (tab_h - UI0902_FONT_BODY) / 2; const char *nums[4] = {"1", "2", "3", "4"}; uint8_t i; for (i = 0; i < 4; i++) { uint16_t x = start_x + i * pitch; - uint16_t bg = (select_tab == i) ? COLOR_GRAD_MID : COLOR_NORMAL_BG; + uint16_t bg = (select_tab == i) ? COLOR_GRAD_MID : UI0902_ROW_BG; LCD_FillRoundRect(x, start_y, tab_w, tab_h, tab_r, bg); LCD_ShowString_AutoAlign( x, x + tab_w, text_y, @@ -761,7 +802,7 @@ void Draw_Tab_Section_Menu(const LEBEL_UI *UI, TAB_SECTION_INDEX select_tab) WHITE, bg, 0, - 12 + UI0902_FONT_BODY ); } } diff --git a/UI/UI_global.h b/UI/UI_global.h index 743c1f7..bee8da2 100644 --- a/UI/UI_global.h +++ b/UI/UI_global.h @@ -31,6 +31,43 @@ void CallUI_RestoreSelect(void); /* 0902 设计稿配色与底栏导航 */ #define UI0902_BG_COLOR 0x0042 /* #000813 页面背景 */ #define UI0902_ROW_BG 0x2147 /* #242B3A 列表行背景 */ + +/* 0902 / 0819:240×320 模式页网格 + * 顶:状态栏下 6px 接双卡;底:拉高控件吃掉底栏上方留白,字体更饱满 */ +#define UI0902_MARGIN_X 12 +#define UI0902_CONTENT_W 216 +#define UI0902_CARD_GAP_TOP 6 +#define UI0902_CARD_Y (UI_STATUS_BAR_H + UI0902_CARD_GAP_TOP) /* 32 */ +#define UI0902_CARD_H 60 +#define UI0902_CARD_W 102 +#define UI0902_CARD_GAP 12 +#define UI0902_MODE_Y (UI0902_CARD_Y + UI0902_CARD_H + 3) /* 95 */ +#define UI0902_MODE_H 64 +#define UI0902_TIMBRE_Y (UI0902_MODE_Y + UI0902_MODE_H + 4) /* 163 */ +#define UI0902_TIMBRE_H 52 +#define UI0902_SECTION_Y (UI0902_TIMBRE_Y + UI0902_TIMBRE_H + 4) /* 219 */ +#define UI0902_SECTION_H 52 +#define UI0902_FONT_LABEL 11 /* 0819:移调/速度/弦音色选择/TAB 等标题 */ +#define UI0902_FONT_BODY 13 /* 0819:曲目/音色正文、演奏段落 */ +#define UI0902_FONT_HERO 16 /* 0819:移调/速度主数值 */ +#define UI0902_FONT_SUB 11 /* KEY / BPM 副标 */ +#define UI0902_FONT_NAV 9 /* 0819:底栏文案(位图内已含) */ +#define UI0902_TAB_H 20 +#define UI0902_TAB_W 58 +#define UI0902_ROW_H 36 +#define UI0902_SECTION_BTN_H 36 +#define UI0902_SECTION_BTN_W 48 +#define UI0902_SECTION_PITCH 54 +#define UI0902_RADIUS_CARD 10 +#define UI0902_RADIUS_TAB 6 +#define UI0902_RADIUS_BTN 6 +#define UI0902_BTN_MINUS_W 23 +#define UI0902_BTN_MINUS_H 22 +#define UI0902_BTN_PLUS_W 23 +#define UI0902_BTN_PLUS_H 22 +#define UI0902_TAB_BACK_W 30 +#define UI0902_TAB_BACK_H 24 + /* 0902 状态栏:左音量条 / 中蓝牙 / 右电池+百分比(对齐屏幕参考 0902-01) */ #define UI0902_VOL_X 8 #define UI0902_VOL_Y 3 @@ -44,10 +81,24 @@ void CallUI_RestoreSelect(void); #define UI0902_BATTERY_RIGHT_MARGIN 8 #define UI0902_BATTERY_TEXT_GAP 4 #define UI0902_BATTERY_TEXT_SIZE 16 -#define UI0902_NAV_SETTING 0 /* 底栏位0:设置(设置页内为返回) */ -#define UI0902_NAV_MIXER 1 /* 底栏位1:调音台 */ -#define UI0902_NAV_MODE 2 /* 底栏位2:模式选择 */ +#define UI0902_NAV_UNIVERSAL 0 /* 底栏:万能模式 */ +#define UI0902_NAV_NORMAL 1 /* 底栏:普通模式 */ +#define UI0902_NAV_EXPERT 2 /* 底栏:专业模式 */ +#define UI0902_NAV_SETTING 3 /* 底栏:设置 */ #define UI0902_NAV_NONE 0xFF +/* 兼容旧名(已废弃三键:设置|调音台|模式) */ +#define UI0902_NAV_MIXER UI0902_NAV_NORMAL +#define UI0902_NAV_MODE UI0902_NAV_EXPERT + +/* 底部图标实际内容(生成脚本曾把 万能/普通/专业/设置 误命名为 Setting/Mixer/Mode) */ +#define gImage_Nav_Universal_Not gImage_UI0902_TabSetting_Sel_36x28 /* 底部-10 白 */ +#define gImage_Nav_Universal_Sel gImage_UI0902_TabMode_Sel_36x28 /* 底部-14 蓝 */ +#define gImage_Nav_Normal_Not gImage_UI0902_TabSetting_Not_35x28 /* 底部-11 白 */ +#define gImage_Nav_Normal_Sel gImage_UI0902_TabMode_Not_35x29 /* 底部-15 蓝 */ +#define gImage_Nav_Expert_Not gImage_UI0902_TabMixer_Sel_35x27 /* 底部-12 白 */ +#define gImage_Nav_Expert_Sel gImage_UI0902_TabBack_Sel_35x27 /* 底部-16 蓝 */ +#define gImage_Nav_Setting_Not gImage_UI0902_TabMixer_Not_18x28 /* 底部-13 白 */ +#define gImage_Nav_Setting_Sel gImage_UI0902_TabBack_Not_18x28 /* 底部-17 蓝 */ /* 旧几何电池(Draw_Battery_Icon)最左起点;0902 图电池用 Draw_Status_Battery_Icon */ #define UI_STATUS_BATTERY_X 150 #define UI_STATUS_BATTERY_H 11 @@ -65,6 +116,7 @@ void Show_Battery_Icon(uint8_t flag); void Show_BL_Icon(uint8_t value); void Draw_Tab_Section_Menu(const LEBEL_UI *UI, TAB_SECTION_INDEX select_tab); +void UI_NavBar_Action(uint8_t value); void Draw_Bottom_Bar(uint8_t sel, uint8_t first_back); void UI_GotoCurrentModePage(void); void GET_Num_Str(int16_t NUM, uint8_t ValidLen, char* Str, uint8_t hasSign); diff --git a/device/LCD_ILI9341/Drv_ILI9341_Lcd_App.c b/device/LCD_ILI9341/Drv_ILI9341_Lcd_App.c index a1b0ae8..5c0c796 100644 --- a/device/LCD_ILI9341/Drv_ILI9341_Lcd_App.c +++ b/device/LCD_ILI9341/Drv_ILI9341_Lcd_App.c @@ -9,6 +9,7 @@ static uint8_t LCD_CnFontMetrics(uint8_t sizey, uint8_t *sizex, uint16_t *typefa switch (sizey) { case 8: *sizex = 8; *typeface_num = 8; return 1; + case 9: *sizex = 9; *typeface_num = 18; return 1; case 11: *sizex = 11; *typeface_num = 22; return 1; case 12: *sizex = 12; *typeface_num = 24; return 1; case 13: *sizex = 13; *typeface_num = 26; return 1; @@ -25,6 +26,7 @@ static uint8_t LCD_GetCnFontByte(uint8_t sizey, uint8_t index, uint16_t i) switch (sizey) { case 8: return Chinese_font_8[index][i]; + case 9: return Chinese_font_9[index][i]; case 11: return Chinese_font_11[index][i]; case 12: return Chinese_font_12[index][i]; case 13: return Chinese_font_13[index][i]; @@ -41,6 +43,7 @@ static uint8_t LCD_GetAsciiFontByte(uint8_t sizey, uint8_t num, uint16_t i) switch (sizey) { case 8: return ascii_84[num][i]; + case 9: return ascii_94[num][i]; case 11: return ascii_115[num][i]; case 12: return ascii_126[num][i]; case 13: return ascii_1306[num][i]; @@ -57,6 +60,7 @@ static const char (*LCD_GetChsTable(uint8_t sizey))[2] switch (sizey) { case 8: return CHS8Table; + case 9: return CHS9Table; case 11: return CHS11Table; case 12: return CHS12Table; case 13: return CHS13Table; @@ -73,6 +77,7 @@ static uint16_t LCD_GetChsTableSize(uint8_t sizey) switch (sizey) { case 8: return (uint16_t)(sizeof(CHS8Table) / 2); + case 9: return (uint16_t)(sizeof(CHS9Table) / 2); case 11: return (uint16_t)(sizeof(CHS11Table) / 2); case 12: return (uint16_t)(sizeof(CHS12Table) / 2); case 13: return (uint16_t)(sizeof(CHS13Table) / 2); @@ -90,6 +95,7 @@ static uint8_t LCD_GetAsciiMetrics(uint8_t size, uint8_t *char_width, uint8_t *c switch (size) { case 8: *char_width = 4; return 1; + case 9: *char_width = 4; return 1; case 11: *char_width = 5; return 1; case 12: *char_width = 6; return 1; case 13: *char_width = 6; return 1; diff --git a/device/LCD_ILI9341/Drv_ILI9341_Lcd_ChineseFont.h b/device/LCD_ILI9341/Drv_ILI9341_Lcd_ChineseFont.h index 2040f29..6aed8f0 100644 --- a/device/LCD_ILI9341/Drv_ILI9341_Lcd_ChineseFont.h +++ b/device/LCD_ILI9341/Drv_ILI9341_Lcd_ChineseFont.h @@ -57,6 +57,67 @@ const char CHS8Table[][2] = { {0xD6,0xC3}, // 置 }; +const char CHS9Table[][2] = { + {0xBA,0xCD}, // 和 + {0xCF,0xD2}, // 弦 + {0xD7,0xDF}, // 走 + {0xCF,0xF2}, // 向 + {0xCF,0xD2}, // 弦 + {0xD2,0xF4}, // 音 + {0xC9,0xAB}, // 色 + {0xD1,0xA1}, // 选 + {0xD2,0xE9}, // 择 + {0xB8,0xE8}, // 歌 + {0xC7,0xFA}, // 曲 + {0xD7,0xD4}, // 自 + {0xD3,0xC9}, // 由 + {0xCD,0xF2}, // 万 + {0xC4,0xDC}, // 能 + {0xC9,0xE8}, // 设 + {0xD6,0xC3}, // 置 + {0xD2,0xC6}, // 移 + {0xB5,0xF7}, // 调 + {0xCB,0xD9}, // 速 + {0xB6,0xC8}, // 度 + {0xD1,0xDD}, // 演 + {0xD7,0xE0}, // 奏 + {0xB6,0xCE}, // 段 + {0xC2,0xE4}, // 落 + {0xCD,0xF2}, // 万 + {0xC4,0xDC}, // 能 + {0xC6,0xD5}, // 普 + {0xCD,0xA8}, // 通 + {0xD7,0xA8}, // 专 + {0xD2,0xB5}, // 业 + {0xC4,0xA3}, // 模 + {0xCA,0xBD}, // 式 + {0xB9,0xCC}, // 固 + {0xBC,0xFE}, // 件 + {0xB0,0xE6}, // 版 + {0xB1,0xBE}, // 本 + {0xC0,0xB6}, // 蓝 + {0xD1,0xC0}, // 牙 + {0xC1,0xB4}, // 链 + {0xBD,0xD3}, // 接 + {0xD7,0xD4}, // 自 + {0xB6,0xAF}, // 动 + {0xB9,0xD8}, // 关 + {0xBB,0xFA}, // 机 + {0xBB,0xD6}, // 恢 + {0xB8,0xB4}, // 复 + {0xB3,0xF6}, // 出 + {0xB3,0xA7}, // 厂 + {0xC9,0xE8}, // 设 + {0xD6,0xC3}, // 置 + {0xC1,0xAC}, // 连 + {0xCA,0xC7}, // 是 + {0xBD,0xDA}, // 节 + {0xC0,0xE0}, // 类 + {0xD0,0xCD}, // 型 + {0xB5,0xD8}, // 地 + {0xC4,0xBF}, // 目 +}; + const char CHS11Table[][2] = { {0xBA,0xCD}, // 和 {0xCF,0xD2}, // 弦 @@ -892,6 +953,67 @@ const unsigned char Chinese_font_12[][24] = { {0x7F,0xE0,0x60,0x60,0x60,0x60,0x7F,0xE0,0x7F,0xE0,0x60,0x60,0x7F,0xE0,0x7F,0xE0,0x60,0x60,0x60,0x60,0x7F,0xE0,0x60,0x60},/*"目",55*/ }; +const unsigned char Chinese_font_9[][18] = { +{0xF7,0x80,0x67,0x80,0xFC,0x80,0xFC,0x80,0x64,0x80,0xFC,0x80,0xEC,0x80,0x67,0x80,0x65,0x80},/*"和",0*/ +{0xE6,0x00,0x3F,0x80,0xE4,0x00,0xCD,0x80,0x9F,0x00,0xE6,0x00,0x25,0x00,0x2D,0x80,0xFF,0x80},/*"弦",1*/ +{0x0C,0x00,0xFF,0x80,0x08,0x00,0xFF,0x80,0x6C,0x00,0x4C,0x00,0x4F,0x80,0xE8,0x00,0xBF,0x80},/*"走",2*/ +{0x18,0x00,0xFF,0x80,0x80,0x80,0xBE,0x80,0xB6,0x80,0xB6,0x80,0xBE,0x80,0x9C,0x80,0x83,0x80},/*"向",3*/ +{0xE6,0x00,0x3F,0x80,0xE4,0x00,0xCD,0x80,0x9F,0x00,0xE6,0x00,0x25,0x00,0x2D,0x80,0xFF,0x80},/*"弦",4*/ +{0xFF,0x80,0x77,0x00,0x37,0x00,0xFF,0x80,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x41,0x00,0x7F,0x00},/*"音",5*/ +{0x3E,0x00,0x7E,0x00,0xC6,0x00,0xFF,0x80,0xC9,0x80,0xFF,0x80,0xFF,0x00,0xC0,0x80,0x7F,0x80},/*"色",6*/ +{0xDE,0x00,0x5F,0x80,0x16,0x00,0xFF,0x80,0xDF,0x80,0x4A,0x00,0x5B,0x80,0xF1,0x80,0xBF,0x80},/*"选",7*/ +{0xC4,0x80,0x57,0x80,0x11,0x80,0xD9,0x00,0xCB,0x00,0xCE,0x00,0xE6,0x00,0x6F,0x00,0xF9,0x80},/*"择",8*/ +{0xFA,0x00,0xDB,0x80,0xFE,0x80,0xFF,0x80,0xFB,0x00,0xDB,0x00,0xFB,0x00,0xFF,0x80,0x3C,0x80},/*"歌",9*/ +{0x36,0x00,0xFF,0x80,0x94,0x80,0x94,0x80,0xFF,0x80,0xF7,0x80,0x94,0x80,0xFF,0x80,0xFF,0x80},/*"曲",10*/ +{0x7F,0x00,0xFF,0x80,0xC1,0x80,0xFF,0x80,0xC1,0x80,0xFF,0x80,0xFF,0x80,0xC1,0x80,0xFF,0x80},/*"自",11*/ +{0x08,0x00,0xFF,0x80,0xC9,0x80,0x88,0x80,0xFF,0x80,0xFF,0x80,0x88,0x80,0xDD,0x80,0xFF,0x80},/*"由",12*/ +{0xFF,0x80,0x30,0x00,0x3F,0x00,0x3F,0x00,0x21,0x00,0x21,0x00,0x61,0x00,0xCF,0x00,0x8E,0x00},/*"万",13*/ +{0x57,0x80,0xFF,0x00,0xFC,0x80,0xF7,0x80,0xF8,0x00,0xF7,0x80,0xF7,0x00,0xF4,0x80,0x97,0x80},/*"能",14*/ +{0xCF,0x00,0x49,0x00,0x19,0x80,0xD0,0x00,0xDF,0x80,0xD9,0x00,0xEF,0x00,0xEE,0x00,0xD9,0x80},/*"设",15*/ +{0xFF,0x80,0xFF,0x80,0xFF,0x80,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00,0xFF,0x80},/*"置",16*/ +{0xE7,0x80,0x4D,0x80,0xFF,0x00,0xEE,0x00,0x5F,0x80,0xEF,0x80,0xDD,0x80,0x47,0x00,0x5C,0x00},/*"移",17*/ +{0xDF,0x80,0x76,0x80,0x9E,0x80,0xDF,0x80,0xDF,0x80,0xDE,0x80,0xFB,0x80,0xFE,0x80,0x23,0x80},/*"调",18*/ +{0xDF,0x80,0x5F,0x80,0x1F,0x80,0xD6,0x80,0xDF,0x80,0x4F,0x00,0x5F,0x80,0xF4,0x80,0xFF,0x80},/*"速",19*/ +{0x7F,0x80,0xDB,0x00,0xFF,0x80,0xDF,0x00,0xDE,0x00,0xFF,0x00,0xFB,0x00,0x9E,0x00,0xFF,0x80},/*"度",20*/ +{0xFF,0x80,0x7F,0x80,0xBF,0x80,0xDF,0x00,0x3F,0x80,0x7F,0x80,0xFF,0x80,0x9F,0x00,0xB9,0x80},/*"演",21*/ +{0xFF,0x80,0x7F,0x00,0x7F,0x00,0xFF,0x80,0x7F,0x00,0xFF,0x80,0xFF,0x80,0x3E,0x00,0x77,0x00},/*"奏",22*/ +{0xE7,0x80,0xCD,0x80,0xFD,0x80,0xCF,0x80,0xFF,0x80,0xC5,0x80,0xF7,0x00,0xC7,0x00,0xDD,0x80},/*"段",23*/ +{0xFF,0x80,0xBE,0x00,0xDF,0x80,0x3B,0x00,0x8F,0x00,0x7B,0x80,0x5F,0x80,0xD1,0x80,0x9F,0x80},/*"落",24*/ +{0xFF,0x80,0x30,0x00,0x3F,0x00,0x3F,0x00,0x21,0x00,0x21,0x00,0x61,0x00,0xCF,0x00,0x8E,0x00},/*"万",25*/ +{0x57,0x80,0xFF,0x00,0xFC,0x80,0xF7,0x80,0xF8,0x00,0xF7,0x80,0xF7,0x00,0xF4,0x80,0x97,0x80},/*"能",26*/ +{0xFF,0x80,0xFF,0x80,0x55,0x00,0xFF,0x80,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00},/*"普",27*/ +{0xDF,0x80,0x4F,0x00,0x1F,0x80,0xDF,0x80,0xDF,0x80,0xDF,0x80,0xD7,0x80,0xF5,0x80,0xFF,0x80},/*"通",28*/ +{0xFF,0x80,0xFF,0x80,0x30,0x00,0xFF,0x80,0x20,0x00,0x7F,0x00,0x43,0x00,0x7E,0x00,0x0F,0x00},/*"专",29*/ +{0x16,0x00,0x16,0x00,0x94,0x80,0xD5,0x80,0x77,0x00,0x77,0x00,0x36,0x00,0x16,0x00,0xFF,0x80},/*"业",30*/ +{0x5F,0x80,0xEF,0x00,0xDF,0x80,0xDF,0x80,0xFF,0x80,0xDF,0x80,0x5F,0x80,0x4F,0x00,0x5B,0x80},/*"模",31*/ +{0x05,0x80,0xFF,0x80,0x0F,0x80,0x04,0x00,0xFE,0x00,0x26,0x00,0x26,0x80,0xFA,0x80,0xF3,0x80},/*"式",32*/ +{0xFF,0x80,0x88,0x80,0xFF,0x80,0x88,0x80,0xBE,0x80,0xA2,0x80,0xBE,0x80,0xC1,0x80,0xFF,0x80},/*"固",33*/ +{0x7A,0x00,0x5F,0x80,0xDF,0x80,0xF2,0x00,0xC6,0x00,0x7F,0x80,0x46,0x00,0x42,0x00,0x46,0x00},/*"件",34*/ +{0xEF,0x80,0xA8,0x00,0xFF,0x80,0xCF,0x80,0xEC,0x80,0xEB,0x00,0xBB,0x00,0xBF,0x80,0xBC,0x80},/*"版",35*/ +{0x08,0x00,0xFF,0x80,0x1C,0x00,0x1C,0x00,0x2A,0x00,0x6B,0x00,0xDD,0x80,0xBE,0x80,0x08,0x00},/*"本",36*/ +{0xFF,0x80,0x36,0x00,0xB7,0x80,0xFF,0x80,0xBB,0x00,0x39,0x00,0xFF,0x80,0xD5,0x80,0xFF,0x80},/*"蓝",37*/ +{0xFF,0x80,0x42,0x00,0x42,0x00,0xFF,0x80,0x1E,0x00,0x1A,0x00,0x72,0x00,0xC2,0x00,0x9E,0x00},/*"牙",38*/ +{0xD7,0x80,0xFF,0x80,0x87,0x00,0xFF,0x80,0xDB,0x80,0xFB,0x00,0xDF,0x80,0xF9,0x00,0xFF,0x80},/*"链",39*/ +{0x5F,0x80,0xEF,0x80,0xCD,0x00,0x5F,0x80,0xEC,0x00,0xDF,0x80,0x59,0x00,0x4F,0x00,0xDF,0x80},/*"接",40*/ +{0x7F,0x00,0xFF,0x80,0xC1,0x80,0xFF,0x80,0xC1,0x80,0xFF,0x80,0xFF,0x80,0xC1,0x80,0xFF,0x80},/*"自",41*/ +{0xF6,0x00,0x07,0x80,0x0F,0x80,0xF6,0x80,0x46,0x80,0xF4,0x80,0x94,0x80,0xFC,0x80,0x0F,0x80},/*"动",42*/ +{0x22,0x00,0xFF,0x00,0xFF,0x80,0x08,0x00,0xFF,0x80,0xFF,0x80,0x1C,0x00,0x36,0x00,0xE3,0x80},/*"关",43*/ +{0x4F,0x00,0xFB,0x00,0xEB,0x00,0x4B,0x00,0xFB,0x00,0xDB,0x00,0x4B,0x80,0x5B,0x80,0x71,0x80},/*"机",44*/ +{0x5F,0x80,0xFF,0x80,0xEA,0x00,0xDA,0x80,0xDF,0x80,0x57,0x00,0x77,0x00,0x6D,0x80,0x58,0x80},/*"恢",45*/ +{0x7F,0x80,0xFF,0x00,0xFF,0x80,0x7F,0x80,0x7F,0x80,0x3F,0x00,0x7F,0x00,0x9E,0x00,0x7F,0x80},/*"复",46*/ +{0xC9,0x80,0xC9,0x80,0xC9,0x80,0xFF,0x80,0x1C,0x00,0x88,0x80,0xC8,0x80,0xC9,0x80,0xFF,0x80},/*"出",47*/ +{0x7F,0x80,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x80,0x00},/*"厂",48*/ +{0xCF,0x00,0x49,0x00,0x19,0x80,0xD0,0x00,0xDF,0x80,0xD9,0x00,0xEF,0x00,0xEE,0x00,0xD9,0x80},/*"设",49*/ +{0xFF,0x80,0xFF,0x80,0xFF,0x80,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00,0xFF,0x80},/*"置",50*/ +{0xDF,0x80,0x5F,0x80,0x1A,0x00,0xDF,0x80,0xCF,0x80,0x46,0x00,0x7F,0x80,0xC2,0x00,0xFF,0x80},/*"连",51*/ +{0x7F,0x00,0x7F,0x00,0x7F,0x00,0x7F,0x00,0xFF,0x80,0x6D,0x00,0x4F,0x80,0xE8,0x00,0xBF,0x80},/*"是",52*/ +{0xFF,0x80,0xFF,0x80,0x22,0x00,0xFF,0x00,0xB7,0x80,0x31,0x00,0x31,0x00,0x37,0x00,0x30,0x00},/*"节",53*/ +{0x6B,0x00,0xFF,0x80,0xFF,0x80,0x7F,0x00,0xC9,0x80,0xFF,0x80,0x1C,0x00,0x36,0x00,0xE3,0x80},/*"类",54*/ +{0xFE,0x80,0x52,0x80,0xFE,0x80,0xDA,0x80,0xD3,0x80,0x89,0x00,0x7F,0x00,0x08,0x00,0xFF,0x80},/*"型",55*/ +{0x46,0x00,0x56,0x00,0xDF,0x80,0xFE,0x80,0x56,0x80,0x57,0x80,0x57,0x80,0xF0,0x80,0x9F,0x80},/*"地",56*/ +{0x7F,0x00,0x41,0x00,0x7F,0x00,0x41,0x00,0x41,0x00,0x7F,0x00,0x41,0x00,0x7F,0x00,0x7F,0x00},/*"目",57*/ +}; + const unsigned char Chinese_font_11[][22] = { {0xF9,0xC0,0xE3,0xE0,0x22,0x60,0xFE,0x60,0x62,0x60,0x72,0x60,0xFA,0x60,0xEE,0x60,0xA3,0xE0,0x23,0xE0,0x22,0x60},/*"和",0*/ {0xF1,0x00,0x3F,0xE0,0x37,0xE0,0xF2,0x40,0xC6,0xC0,0xCF,0x80,0xF7,0x80,0x33,0xC0,0x36,0x40,0x3F,0xE0,0xEF,0xE0},/*"弦",1*/ diff --git a/device/LCD_ILI9341/Drv_ILI9341_Lcd_EnglishFont.h b/device/LCD_ILI9341/Drv_ILI9341_Lcd_EnglishFont.h index b07d00e..b01f7a6 100644 --- a/device/LCD_ILI9341/Drv_ILI9341_Lcd_EnglishFont.h +++ b/device/LCD_ILI9341/Drv_ILI9341_Lcd_EnglishFont.h @@ -990,3 +990,101 @@ const unsigned char ascii_2814[][56]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x3E,0x00,0x7E,0x00,0xFC,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xE0,0x01,0xE0,0x07,0xC0,0x07,0xE0,0x07,0xE0,0x01,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00},/*"}",93*/ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x21,0xF8,0x3F,0xFC,0x3F,0xFC,0x3F,0x18,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/ }; + +const unsigned char ascii_94[][9]={ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*""",2*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"#",3*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"$",4*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"%",5*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"&",6*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"(",8*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"*",10*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"+",11*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"-",13*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"/",15*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"0",16*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"1",17*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"2",18*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"3",19*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"4",20*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"5",21*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"6",22*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"7",23*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"8",24*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"9",25*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"<",28*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"=",29*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*">",30*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"?",31*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"@",32*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"A",33*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"B",34*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"C",35*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"D",36*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"E",37*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"F",38*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"G",39*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"H",40*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"I",41*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"J",42*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"K",43*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"L",44*/ +{0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00},/*"M",45*/ +{0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00},/*"N",46*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"O",47*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"P",48*/ +{0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00},/*"Q",49*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"R",50*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"S",51*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"T",52*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"U",53*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"V",54*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"W",55*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"X",56*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"Y",57*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"Z",58*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"[",59*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"\",60*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"_",63*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"a",65*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"b",66*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"c",67*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"d",68*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"e",69*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"f",70*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"g",71*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"h",72*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"i",73*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"j",74*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"k",75*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"l",76*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"m",77*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"n",78*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"o",79*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"p",80*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"q",81*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"r",82*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"s",83*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"t",84*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"u",85*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"v",86*/ +{0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*"w",87*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"x",88*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"y",89*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"z",90*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"{",91*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/ +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/ +}; diff --git a/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.c b/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.c index 5149a23..af62260 100644 --- a/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.c +++ b/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.c @@ -1160,3 +1160,233 @@ const unsigned char gImage_UI0902_TabBack_Not_18x28[1008] = { /* 18x28 RGB565 BE 0x00,0x85,0x12,0x54,0x00,0xC7,0x00,0x21,0x00,0x63,0x09,0xAE,0x09,0x2B,0x09,0x6D, 0x09,0xF0,0x09,0xF0,0x09,0xF0,0x09,0xF0,0x09,0xF0,0x09,0xF0,0x09,0xF0,0x00,0xE8, }; + +/* 0903 supplement icons */ + +const unsigned char gImage_UI0902_BtnMinus_23x22[1012] = { /* 23x22 RGB565 BE */ +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21, +0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21, +0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21, +0x00,0x63,0x08,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x84,0x00,0x42,0x00,0x00,0x00,0x21,0x08,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x84,0x00,0x00,0x00,0x62,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21, +0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0xC6,0x39,0xC6,0x39,0xC6,0x39,0xC6,0x39, +0xC6,0x39,0xC6,0x39,0xC6,0x39,0xC6,0x39,0xC6,0x39,0xC6,0x39,0x6B,0x6E,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x8C,0x52,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B, +0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x29,0xA7,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x00,0x21,0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21, +0x08,0x62,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x08,0x62,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x00,0x42,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x00,0x00,0x21,0x08,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x08,0x83,0x00,0x00,0x00,0x21,0x00,0x42,0x08,0x83,0x08,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0xA4,0x00,0x63, +0x00,0x42,0x00,0x00, +}; + +const unsigned char gImage_UI0902_BtnPlus_23x22[1012] = { /* 23x22 RGB565 BE */ +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21, +0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21, +0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x42,0x08,0x84,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0xA4,0x00,0x63,0x00,0x21,0x00,0x00,0x08,0x84, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x21,0x00,0x00,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62, +0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x6B,0x6E,0xC6,0x39,0xC6,0x39,0xC6,0x39, +0xD6,0xBA,0xFF,0xFF,0xF7,0x9E,0xC6,0x39,0xC6,0x39,0xC6,0x39,0xC6,0x39,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x8C,0x52,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x29,0xA7,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x7B,0xF0,0xFF,0xFF, +0xD6,0xBA,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x4A,0x8B,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x08,0x62,0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x4A,0x8B,0xFF,0xFF,0xC6,0x39,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62, +0x00,0x21,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x29,0xA7,0x8C,0x52,0x6B,0x6E,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x21,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0x62,0x00,0x00,0x08,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x00,0x62,0x00,0x00,0x00,0x63,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x08,0xA4,0x00,0x21,0x00,0x00,0x00,0x42,0x00,0x63,0x08,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4, +0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x10,0xA4,0x08,0xA4,0x08,0x83, +0x00,0x42,0x00,0x21, +}; + +const unsigned char gImage_UI0902_TabBack_30x24[1440] = { /* 30x24 RGB565 BE */ +0x00,0x21,0x00,0x42,0x10,0xE5,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x26,0x10,0xC4,0x00,0x42,0x00,0x21,0x00,0x42,0x19,0x26, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x10,0xE5,0x00,0x21,0x08,0xA4,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x00,0x42,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4, +0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x4A,0x8B,0xF7,0x9E,0xFF,0xFF,0xD6,0xDB, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4, +0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x4A,0x8B,0xF7,0x9E,0xFF,0xFF,0xD6,0xDB,0x31,0xC8,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x31,0xC8,0xF7,0x9E, +0xFF,0xFF,0xF7,0x9E,0x31,0xC8,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x31,0xC8,0xD6,0xDB,0xFF,0xFF,0xFF,0xFF,0x84,0x52, +0x5B,0x0D,0x5B,0x0D,0x5B,0x0D,0x5B,0x0D,0x5B,0x0D,0x5B,0x0D,0x5B,0x0D,0x5B,0x0D, +0x5B,0x0D,0x5B,0x0D,0x4A,0x8B,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0xD6,0xDB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xCE,0x59,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4, +0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x94,0xB3, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xCE,0x59,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0xAD,0x96,0xFF,0xFF, +0xFF,0xFF,0x73,0xD0,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0xAD,0x96,0xFF,0xFF,0xFF,0xFF, +0x73,0xD0,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0xCE,0x59,0xFF,0xFF,0xFF,0xFF,0x73,0xD0, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4, +0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x31,0xC8,0x94,0xB3,0x94,0xB3,0x94,0xB3,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x10,0xA4,0x19,0x05,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x10,0xA4, +0x10,0xE5,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x08,0xA3,0x08,0x63,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x00,0x41,0x00,0x21,0x10,0xE5,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47,0x21,0x47, +0x08,0xA4,0x00,0x21,0x00,0x21,0x00,0x21,0x08,0x63,0x10,0xC4,0x19,0x05,0x19,0x05, +0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05, +0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05,0x19,0x05, +0x19,0x05,0x19,0x05,0x19,0x05,0x18,0xE5,0x10,0xC4,0x00,0x42,0x00,0x21,0x00,0x00, +}; + diff --git a/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.h b/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.h index e332bec..68cb2f0 100644 --- a/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.h +++ b/device/LCD_ILI9341/Drv_ILI9341_Lcd_Image_UI0902.h @@ -17,4 +17,8 @@ extern const unsigned char gImage_UI0902_TabMode_Not_35x29[2030]; extern const unsigned char gImage_UI0902_TabBack_Sel_35x27[1890]; extern const unsigned char gImage_UI0902_TabBack_Not_18x28[1008]; +extern const unsigned char gImage_UI0902_BtnMinus_23x22[1012]; +extern const unsigned char gImage_UI0902_BtnPlus_23x22[1012]; +extern const unsigned char gImage_UI0902_TabBack_30x24[1440]; + #endif diff --git a/tools/gen_misans_font.py b/tools/gen_misans_font.py index e05e339..3e7b916 100644 --- a/tools/gen_misans_font.py +++ b/tools/gen_misans_font.py @@ -196,6 +196,22 @@ def ensure_chs8_table(text, tables): return text, tables +def ensure_chs9_table(text, tables): + if "CHS9Table" in tables: + return text, tables + src = "CHS11Table" if "CHS11Table" in tables else ("CHS12Table" if "CHS12Table" in tables else None) + if not src: + return text, tables + entries = tables[src] + block = "const char CHS9Table[][2] = {\n" + for (h, l), cmt in entries: + block += f" {{0x{h:02X},0x{l:02X}}}, // {cmt}\n" + block += "};\n\n" + text = text.replace("const char CHS11Table", block + "const char CHS11Table", 1) + tables["CHS9Table"] = entries + return text, tables + + def ensure_chs15_table(text, tables): if "CHS15Table" in tables: return text, tables @@ -217,6 +233,11 @@ def main(): print("Medium:", medium) print("Semibold:", semibold) + only = None + for a in sys.argv[1:]: + if a.startswith("--only="): + only = {int(x) for x in a.split("=", 1)[1].split(",") if x.strip()} + with open(HEADER_IN, "r", encoding="utf-8", errors="replace") as f: text = f.read() @@ -224,17 +245,20 @@ def main(): print("Tables:", {k: len(v) for k, v in tables.items()}) text, tables = ensure_chs8_table(text, tables) + text, tables = ensure_chs9_table(text, tables) text, tables = ensure_chs15_table(text, tables) # Regenerate all Chinese font arrays - cn_sizes = [8, 11, 12, 13, 15, 16, 24, 28] + cn_sizes = [8, 9, 11, 12, 13, 15, 16, 24, 28] + if only: + cn_sizes = [s for s in cn_sizes if s in only] for size in cn_sizes: if size in (24, 28): table_key = "CHS24Table" font = ImageFont.truetype(semibold if size == 28 else medium, size - 2) else: table_key = { - 8: "CHS8Table", 11: "CHS11Table", 12: "CHS12Table", + 8: "CHS8Table", 9: "CHS9Table", 11: "CHS11Table", 12: "CHS12Table", 13: "CHS13Table", 15: "CHS15Table", 16: "CHS16Table", }[size] # Point size ≈ cell; supersampled in render_glyph @@ -253,6 +277,8 @@ def main(): anchor = "const unsigned char Chinese_font_11" if size == 8: anchor = "const unsigned char Chinese_font_11" + elif size == 9: + anchor = "const unsigned char Chinese_font_11" elif size == 15: anchor = "const unsigned char Chinese_font_16" elif size == 28: @@ -268,6 +294,7 @@ def main(): f.write(text) # English / ASCII:默认跳过,避免破坏已校准的数字字模;需要时传 --ascii + # --only= 仅过滤要生成的字号,仍须配合 --ascii 才会写英文头文件 if "--ascii" not in sys.argv: print("Skip English fonts (pass --ascii to regenerate).") print("Done.") @@ -277,10 +304,12 @@ def main(): eng = f.read() ascii_targets = [ - (8, medium, None), (11, medium, None), (12, medium, None), (13, medium, "ascii_1306"), - (15, medium, None), (16, medium, "ascii_1608"), (24, medium, "ascii_2412"), - (28, semibold, None), + (8, medium, None), (9, medium, None), (11, medium, None), (12, medium, None), + (13, medium, "ascii_1306"), (15, medium, None), (16, medium, "ascii_1608"), + (24, medium, "ascii_2412"), (28, semibold, None), ] + if only: + ascii_targets = [t for t in ascii_targets if t[0] in only] for size, ttf, legacy_name in ascii_targets: font = ImageFont.truetype(ttf, size - 1) name, arr = generate_ascii_array(size, font, legacy_name)