📄 setup_ui_up.c
字号:
#ifdef SELECT_MEDIA_IN_SETUPMENU //Maoyong 2004-8-9 21:42
BYTE IsMediaItemUpValid(void)
{
BYTE iRes = 0;
if(index_y2 == CARD_ITEM){
if(!IsNoPluggedUSB() )
iRes = 1;
}
return iRes;
}
void up_skip_media_sub_item(void)
{
if(index_y2 == CARD_ITEM) {
if( IsNoPluggedUSB() ){
index_y2 -= 2;
return;
}
}
index_y2 --;
}
#endif //#ifdef SELECT_MEDIA_IN_SETUPMENU
void setup_func_up(void)
{
BYTE upperbound;
const char *str;
int i;
#ifdef SUPPORT_FUNCTION_MENU
if(full_scrn&SETUP_PLUS)
{
#ifdef DEBUG_FUNCTION_MENU
printf("up key press, setupLevel:%d,index_y:%d index_y2:%d\n",setupLevel,index_y,index_y2);
#endif
if(setupLevel==1)
{//in the first level menu page
#ifdef DEBUG_FUNCTION_MENU
printf("---up in the first menu,index_y2:%d\n",index_y2);
#endif
#ifdef SUPPORT_DISPLAY_MENU
if(In_Display_Menu())
setup_menu_plus_timer = DISPLAY_MENU_SHOW_TIME;
else
#endif//end #ifdef SUPPORT_DISPLAY_MENU
setup_menu_plus_timer = MENU_PLUS_SHOW_TIME;
#ifdef SUPPORT_DISPLAY_MENU
if(In_Goto_Menu())
{
#ifdef DEBUG_DISPLAY_MENU
printf("up...ir:%d.....\n",ir_select_number);
#endif
if(index_x != 6)
{
if(index_x>=10)
{
if((index_x == 10) && (ir_select_number<6))
ir_select_number++;
else if(ir_select_number < 9)
{
if(((goto_time%100)/10) != 6)
ir_select_number++;
}
}
else if(ir_select_number < 9)
ir_select_number++;
}
search_func_input();
printf(" after ser ir:%d...........\n",ir_select_number);
ShowSetupPage_plus(MENU_REFRESH);
#ifdef DEBUG_DISPLAY_MENU
printf("up...index_x:%d goto_time:%d ir:%d.....\n",index_x,goto_time,ir_select_number);
#endif
return;
}
#endif//end #ifdef SUPPORT_DISPLAY_MENU
if(index_y < MAX_PAGE_ITEM_PLUS)
{
//clear the 2nd level menu
down_osd_clear_3th_menu();
//调整内容的上升
{
if(index_y == 0)
#ifdef SUPPORT_DISPLAY_MENU
if(In_Display_Menu())
index_y = MAX_PAGE_ITEM_PLUS-2;
else
#endif
index_y = 4;
else
index_y --;
//we must skip the invalid item!
#ifdef SUPPORT_DISPLAY_MENU
if(In_Display_Menu())
{
if(display_item_invalid[index_y] == ITEM_INVALID_FLAG)
{
for(;display_item_invalid[index_y]==ITEM_INVALID_FLAG;index_y--)
;
}
}
#endif
//将菜单项目反显
id = setup_item_plus[page][index_y][1];
setup_DrawItem(1, index_y+SETUP_MENU_YSTART_PLUS, 1);
}
#if 0
if(index_y < MAX_PAGE_ITEM_PLUS)
{
if((index_y != 0) && (index_y != 4))
down_draw_action_item();
}
#endif
}
}
else if(setupLevel == 2)
{//in the 2th level menu page
#ifdef DEBUG_FUNCTION_MENU
printf("---up in the 2th menu,index_y2:%d\n",index_y2);
#endif
/*
if (setup_item_plus[page][index_y][0]==SET_SCALE)
{
//亮度加1且将其显示出来
setup_CookScaleItem(id, 1);
//记忆?
//run_save_sel_cmd(page,index_y);
}
else
*/
if(setup_item_plus[page][index_y][0] == SET_FUNC)
{
setup_menu_plus_timer = MENU_PLUS_SHOW_TIME;
if (index_y2 > 0)
{
sel = setup_sel_plus[page][index_y];
id = setup_item_plus[page][index_y][index_y2+2];
str = setup_SetItemString();
if ((index_y2+2) == sel)
{
//keep upper button to UP mode with SANTIBGCOLOR
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 15:39
osd_draw_setup_button(SETUP_SUB_XSTART_PLUS, index_y2+submenuStart, SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS, SBGCOLOR, 1);
#endif
osd_DrawString(SETUP_SUB_XSTART_PLUS+1, index_y2+submenuStart, str, SDEFAULTCOLOR, SBGCOLOR);
}
else
{
//normal UP button
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 15:39
osd_draw_setup_button(SETUP_SUB_XSTART_PLUS, index_y2+submenuStart, SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS, SBGCOLOR, 0);
#endif
osd_DrawString(SETUP_SUB_XSTART_PLUS+1, index_y2+submenuStart, str, SFONTCOLOR, SBGCOLOR);
}
index_y2--;
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 15:39
if ((index_y2+2) == sel)
{
osd_draw_setup_button(SETUP_SUB_XSTART_PLUS, index_y2+submenuStart, SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS, SANTIBGCOLOR, 1);
}
else
{
osd_draw_setup_button(SETUP_SUB_XSTART_PLUS, index_y2+submenuStart, SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS, SANTIBGCOLOR, 0);
}
#endif
id = setup_item_plus[page][index_y][index_y2+2];
str = setup_SetItemString();
osd_DrawString(SETUP_SUB_XSTART_PLUS+1, index_y2+submenuStart, str, SANTIFONTCOLOR, SANTIBGCOLOR);
}
}
}
}
else
{
#endif //end #ifdef SUPPORT_FUNCTION_MENU
#ifdef SETUP_PASSWORD_GUI//zhaoyanhua add 2004-1-16 11:15
//in PASSWORD GUI, LEFT/RIGHT/UP/DOWN has no use.
if(passwdGUI_state != NO_GUI_STATE)
return;
#endif
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE //zhaoyanhua add 03-11-7 16:02
if(main_setup)
{
switch(index_x)
{
case EXIT_SETUP_MENU_X:
draw_setup_Btn_HL( 1,EXIT_SETUP_MENU_X*14+32, EXIT_SETUP_MENU_Y*4, 9* 24, 1*32,4,MAIN_SETUP_PAGE_BGCOLOR);
index_x = ONE_KEY_PASS_X;
draw_setup_Btn_HL( 1, ONE_KEY_PASS_X*11, ONE_KEY_PASS_Y*4, 8* 24, 1*32,4,SETUP_HL_COLOR);
break;
case ONE_KEY_PASS_X:
break;
case SETUP_X:
break;
}
return;
}
#endif
#ifdef SETUP_COLOR_TYPE1 //wangfeng 2003-08-29 17:28
// UINT16 line=SETUP_MAX_WIDTH*16;
SetOsdCol(0,0,SANTIBGCOLOR,0x78501e90);
#elif defined(SETUP_COLOR_TYPE2)
//SetOsdCol(0,0,SANTIBGCOLOR,0xc0c0c0e0);
SetOsdCol(0,0,SANTIBGCOLOR,0xa346ffc0);
// UINT16 line=SETUP_MAX_WIDTH*16-20;
#else
// UINT16 line=SETUP_MAX_WIDTH*16-20;
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-2 17:38
SetOsdCol(mn_osd_col2); //2004-4-17 01:45张宇P
#endif
#endif
reset_passwd_cnt();
if (full_scrn&CUSTM) {
upperbound=2;
} else {
upperbound=0;
}
if (setupLevel==0) {
setupLevel=1;
index_y_start=0;
for (i=7;i>=0;i--)
{
if (setup_item[page][i][1]==STR_OS_RETURN_MAIN_SETUP)
{
index_y=i;
break;
}
}
// highlight : draw a frame to identify which tab is enable
/*osd_DrawLine(line*page/6+30,14,line*page/6+80,14,SBGCOLOR,1);
osd_DrawLine(line*page/6+30,50,line*page/6+80,50,SBGCOLOR,1);
osd_DrawLine(line*page/6+30,14,line*page/6+30,50,SBGCOLOR,1);
osd_DrawLine(line*page/6+80,14,line*page/6+80,50,SBGCOLOR,1);*/
// #ifndef SETUP_COLOR_TYPE1 //wangfeng 2003-08-29 17:28
#if !defined(SETUP_COLOR_TYPE1)&& !defined(SETUP_COLOR_TYPE2)&& !defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-5 10:04//zhangyu
#ifndef DVB_MENU_SETUP_STYLE
setup_Showredframe(page);
#else
setup_Showredframe(dvbpage);
#endif
#endif
id = setup_item[page][index_y+index_y_start][1];
setup_DrawItem(1, index_y+SETUP_MENU_YSTART+1, 1);
return;
} else
if (setupLevel==1) {
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE //calculate setupItemNum[1] true value.zhaoyanhua add 03-11-7 14:03
int iItemType;
for (i=0; i<MAX_PAGE_ITEM; i++)
{
iItemType=setup_item[page][i][0];
if (iItemType == SET_SPACE) continue;
if (iItemType == SET_NE) break;
}
setupItemNum[1] = i;
#endif
if (index_y==0)
{
#ifdef VIDEO_SETUP_NEW_GUI//zhaoyanhua add 2004-1-8 10:41
if(page == VIDEOPAGE)
osd_draw_rect((SETUP_SUB_XSTART-1)*16,(index_y +SETUP_MENU_YSTART)*SETUP_BUTTON_HEIGHT+30,(SETUP_MAX_WIDTH-SETUP_SUB_XSTART-1)*16,SETUP_BUTTON_HEIGHT,SBGCOLOR);
else
#endif//VIDEO_SETUP_NEW_GUI
#ifdef SETUP_COLOR_TYPE1 //wangfeng 2003-08-29 17:28
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -