void k_InitMenu(void) { uint8_t i = 0; WM_HWIN hItem; WM_SetCallback(WM_GetDesktopWindowEx(0), _cbBk); hIcon = ST_AnimatedIconView_CreateEx(0, 0, LCD_GetXSize() - 80, LCD_GetYSize() - 0, WM_GetDesktopWindowEx(0), WM_CF_SHOW | WM_CF_HASTRANS , 0, ID_ICONVIEW_MENU, 100, 120, 40, 5); ST_AnimatedIconView_SetDualFont(hIcon, &GUI_FontLubalGraph16, &GUI_FontLubalGraph16); ST_AnimatedIconView_SetSpace(hIcon, GUI_COORD_Y, 0); ST_AnimatedIconView_SetSpace(hIcon, GUI_COORD_X, 0); ST_AnimatedIconView_SetFrame(hIcon, GUI_COORD_Y, 0); ST_AnimatedIconView_SetFrame(hIcon, GUI_COORD_X, 0); ST_AnimatedIconView_SetTextColor(hIcon, ICONVIEW_CI_UNSEL, GUI_STCOLOR_LIGHTBLUE); ST_AnimatedIconView_SetBkColor(hIcon, ICONVIEW_CI_UNSEL, GUI_WHITE); ST_AnimatedIconView_SetBkColor(hIcon, ICONVIEW_CI_SEL, GUI_WHITE); ST_AnimatedIconView_SetSel(hIcon, -1); ST_AnimatedIconView_SetDualTextColor(hIcon, ICONVIEW_CI_SEL, GUI_STCOLOR_LIGHTBLUE, GUI_STCOLOR_DARKBLUE ); for (i = 0; i < k_ModuleGetNumber(); i++) { ST_AnimatedIconView_AddIcon(hIcon, module_prop.module->open_icon, module_prop.module->close_icon, (char *)module_prop.module->name); } hItem = TEXT_CreateEx(407, 152, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_FPU, "FPU : ON"); TEXT_SetFont(hItem, GUI_FONT_8_1); TEXT_SetTextColor(hItem, GUI_WHITE); hItem = TEXT_CreateEx(407, 167, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_IC, "I-Cache : ON"); TEXT_SetFont(hItem, GUI_FONT_8_1); TEXT_SetTextColor(hItem, GUI_WHITE); hItem = TEXT_CreateEx(407, 182, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_DC, "D-Cache : ON"); TEXT_SetFont(hItem, GUI_FONT_8_1); TEXT_SetTextColor(hItem, GUI_WHITE); hCPULoad = TEXT_CreateEx(407, 198, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_CPU, "MCU Load : --%"); TEXT_SetFont(hCPULoad, GUI_FONT_8_1); TEXT_SetTextColor(hCPULoad, GUI_WHITE); hItem = TEXT_CreateEx(407, 212, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_FREQ, "Clk : 200 MHz"); TEXT_SetFont(hItem, GUI_FONT_8_1); TEXT_SetTextColor(hItem, GUI_WHITE); hRefreshTimer = WM_CreateTimer(WM_GetDesktopWindowEx(0), 0, 500, 0); } |