setup_ui_right.c
上传用户:caisangzi8
上传日期:2013-10-25
资源大小:15756k
文件大小:20k
源码类别:

DVD

开发平台:

C/C++

  1. void setup_func_right(void)
  2. {
  3. #ifdef SETUP_DONGLI459          //dingzhy  for  tonic  2004-2-10 22:56
  4. if(ShowPasswordErr)
  5. ShowPasswordErr=0;
  6. #endif
  7.     const char *str;
  8.     UINT16 line = 0;
  9.     #ifdef DVB_MENU_SETUP_STYLE    
  10.     //if(((page == INSTALLPAGE)||(page == CHANNELPAGE))&&(setupLevel)&&(system_state == SYSTEM_TS))
  11.     if(IsDvbStateNoSubMenu())   //In Dvb Mode, Level 1 has no sub item
  12.         return;
  13.     #endif
  14.     
  15.     #ifdef SUPPORT_FUNCTION_MENU
  16.     if(full_scrn&SETUP_PLUS)
  17.     {
  18.       #ifdef DEBUG_FUNCTION_MENU
  19.       printf("right key press,index_y:%d,index_y2:%d",index_y,index_y2);
  20.       #endif
  21.       #ifdef SUPPORT_DISPLAY_MENU
  22.       if(In_Display_Menu())
  23.         setup_menu_plus_timer = DISPLAY_MENU_SHOW_TIME;
  24.       else
  25.       #endif//end #ifdef SUPPORT_DISPLAY_MENU
  26.       setup_menu_plus_timer = MENU_PLUS_SHOW_TIME;
  27.       
  28.       #ifdef SUPPORT_DISPLAY_MENU
  29.       if(In_Display_Menu())
  30.       {
  31.         exe_display_function(1);
  32.         return;
  33.       }
  34.       #endif
  35.       
  36.       if(index_y != 2)
  37.         return;
  38.     
  39.       //if(setup_item_plus[page][index_y][0] == SET_FUNC)
  40.       {//LCD mode
  41.       //change string color of current selection item in selection area
  42.       submenuStart = index_y + SETUP_MENU_YSTART_PLUS;
  43.     
  44.         {
  45.             BYTE i;
  46.             //绘制箭头
  47.             #ifdef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 17:12
  48.             osd_DrawString(SETUP_SUB_XSTART_PLUS-1, index_y+SETUP_MENU_YSTART_PLUS, Ch_arrorR, SANTIFONTCOLOR, SBGCOLOR);
  49.             #else
  50.             osd_DrawString(SETUP_SUB_XSTART_PLUS-1, index_y+SETUP_MENU_YSTART_PLUS, Ch_arrorR, SFONTCOLOR, SBGCOLOR);
  51.             #endif
  52.             //将子菜单绘出来!
  53.             for (i=2; i<MAX_ITEM_SEL_PLUS; i++) 
  54.             {
  55.               sel = setup_sel_plus[page][index_y];
  56.               id = setup_item_plus[page][index_y][i];
  57.               if (id==0) break;
  58.             
  59.               ShowSel(SETUP_SUB_XSTART_PLUS, (i-2+submenuStart), SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS,sel == i);
  60.             }
  61.         }
  62.         //将之前标中的菜单项转为正常显示
  63.         #ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 15:39 
  64.         osd_draw_setup_button(SETUP_MENU_XSTART_PLUS, index_y+SETUP_MENU_YSTART_PLUS, SETUP_SUB_XSTART_PLUS-SETUP_MENU_XSTART_PLUS-1, SBGCOLOR, 1);
  65.         #endif
  66.         id = setup_item_plus[page][index_y][1];
  67.         str = _OsdMessegeFont1[osd_font_mode][id];
  68.         osd_DrawString(SETUP_MENU_XSTART_PLUS+1, index_y+SETUP_MENU_YSTART_PLUS, str, SDEFAULTCOLOR,SBGCOLOR);
  69.        
  70.     
  71.       sel=setup_sel_plus[page][index_y];
  72.     
  73.       index_y2 = sel-2;
  74.     
  75.         //反显子菜单的菜单项以表示选中
  76.         id = setup_item_plus[page][index_y][index_y2+2];
  77.         str = setup_SetItemString();
  78.         #ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 15:39    
  79.         osd_draw_setup_button(SETUP_SUB_XSTART_PLUS, index_y2+submenuStart, SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS, SANTIBGCOLOR, 1);
  80.         #endif
  81.         osd_DrawString(SETUP_SUB_XSTART_PLUS+1, index_y2+submenuStart, str, SANTIFONTCOLOR, SANTIBGCOLOR);
  82.         
  83.       setupLevel = 2;
  84.     }
  85.     }
  86.     else
  87.     {
  88.     #endif //end #ifdef SUPPORT_FUNCTION_MENU
  89.     
  90. #ifdef SETUP_PASSWORD_GUI//zhaoyanhua add 2004-1-16 11:15
  91.         //in PASSWORD GUI, LEFT/RIGHT/UP/DOWN has no use.
  92.         if(passwdGUI_state != NO_GUI_STATE)
  93.             return;
  94. #endif              
  95.     
  96.     #ifdef SUPPORT_FUNCTION_MENU
  97.     #ifdef SUPPORT_SPI
  98.     if (setup_item[page][index_y+index_y_start][0] == SET_SHOW) 
  99.       return;
  100.     #endif
  101.     #endif
  102.     
  103.     /*#ifdef    SETUP_COLOR_TYPE1   //wangfeng 2003-08-29 17:28
  104.     UINT16 line=SETUP_MAX_WIDTH*16;
  105.     SetOsdCol(0,0,SANTIBGCOLOR,0x78501e90);
  106.         #elif defined(SETUP_COLOR_TYPE2)    
  107.         UINT16 line=SETUP_MAX_WIDTH*16-20;  
  108.         SetOsdCol(0,0,SANTIBGCOLOR,0xc0c0c0e0); 
  109.     #else
  110.     UINT16 line=SETUP_MAX_WIDTH*16-20;
  111.     SetOsdCol(0,0,SANTIBGCOLOR,0xa346ffc0);
  112.     #endif*/
  113.     
  114. #ifdef  SETUP_COLOR_TYPE1   //wangfeng 2003-08-29 17:28
  115.     line=SETUP_MAX_WIDTH*16;
  116.     SetOsdCol(0,0,SANTIBGCOLOR,0x78501e90);
  117. #elif defined(SETUP_COLOR_TYPE2)
  118.     #if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE         //zhaoyanhua add 2003-11-30 21:38
  119.     if(!main_setup)
  120.     #endif
  121.     {
  122.         //SetOsdCol(0,0,SANTIBGCOLOR,0xc0c0c0e0);
  123.         SetOsdCol(0,0,SANTIBGCOLOR,0xa346ffc0);
  124.         line=SETUP_MAX_WIDTH*16-20;
  125.     }
  126. #else
  127.     #ifdef HANYANG_SETUPMENU//caoh2004-6-18 11:17
  128.     line=SETUP_MAX_WIDTH*16+260;
  129.     #else
  130.      line=SETUP_MAX_WIDTH*16-20;
  131.     #endif
  132.     #ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-2 17:38
  133.     SetOsdCol(mn_osd_col2);       //2004-4-17 01:45张宇P
  134.    #endif
  135. #endif
  136. #if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE         //right
  137.     if (main_setup)
  138.     {
  139.         switch(index_x)
  140.         {
  141.             case ONE_KEY_PASS_X :
  142.                 draw_setup_Btn_HL( 1, ONE_KEY_PASS_X*11, ONE_KEY_PASS_Y*4, 8* 24, 1*32,4,MAIN_SETUP_PAGE_BGCOLOR);  
  143.                 index_x = SETUP_X;
  144.                 draw_setup_Btn_HL( 1,SETUP_X*14+28, SETUP_Y*4, 8* 24, 1*32,4,SETUP_HL_COLOR);
  145.                 break;
  146.             case SETUP_X:
  147.                 draw_setup_Btn_HL( 1,SETUP_X*14+28, SETUP_Y*4, 8* 24, 1*32,4,MAIN_SETUP_PAGE_BGCOLOR);
  148.                 index_x = EXIT_SETUP_MENU_X;
  149.                 draw_setup_Btn_HL( 1,EXIT_SETUP_MENU_X*14+32, EXIT_SETUP_MENU_Y*4, 9* 24, 1*32,4,SETUP_HL_COLOR);       
  150.                 break;
  151.             case EXIT_SETUP_MENU_X:
  152.             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);      
  153.                 index_x = SETUP_X;
  154.                 draw_setup_Btn_HL( 1,SETUP_X*14+28, SETUP_Y*4, 8* 24, 1*32,4,SETUP_HL_COLOR);
  155.                 break;
  156.         }
  157.         return;
  158.     }
  159. #endif
  160.     
  161.     if ((setupLevel==0)
  162. #if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE         
  163.         &&(!one_key_pass_flag)
  164. #endif  
  165.         )  
  166.     {
  167.         //#if defined(SAME_DISC_RESUME)||defined(SHOW_STANDBY_TIMER)
  168.         #if defined(NEXTPAGE_SYS)       //freyman 2004-3-26 0:06
  169.         if(page==SysNextPage) page=0;
  170.         #endif
  171.         // make tab disable
  172. #ifndef SETUP_COLOR_TYPE1
  173. #ifdef SETUP_COLOR_TYPE2
  174. osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+7, 13);
  175. #else
  176.           #if !defined(SPE_SETUP) && !defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-4 14:17 //2004-4-21 02:05张宇P bmmm
  177. #ifndef DVB_MENU_SETUP_STYLE
  178.         osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
  179. #else
  180.         osd_draw_rect(line*dvbpage/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
  181. #endif
  182.         
  183. #endif
  184. #endif
  185.        #endif
  186. //      #ifndef SETUP_COLOR_TYPE1   //wangfeng 2003-08-29 17:28
  187. #if !defined(SETUP_COLOR_TYPE1)&& !defined(SETUP_COLOR_TYPE2)&& !defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-4 14:17
  188. #ifdef SPE_SETUP      //2004-4-21 02:05张宇P bmmm
  189.         // osd_draw_rect((line*page)/6+12, 10, line/6-4, SETUP_BUTTON_HEIGHT+10, 6);//2004-4-28 10:36lorenc osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
  190.          if(page<3)
  191.          #ifdef HANYANG_SETUPMENU//caoh2004-6-18 11:35
  192.          osd_draw_rect((line*page)/6+20, 10, line/6+2, SETUP_BUTTON_HEIGHT+10, 6);//2004-4-28 10:36lorenc osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
  193.          #else
  194.          osd_draw_rect((line*page)/6+21, 10, line/6+2, SETUP_BUTTON_HEIGHT+10, 6);//2004-4-28 10:36lorenc osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
  195.          #endif
  196.          else
  197.         osd_draw_rect((line*page)/6+12, 10, line/6-4, SETUP_BUTTON_HEIGHT+10, 6);//2004-4-28 10:36lorenc osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
  198. #else
  199. #ifndef DVB_MENU_SETUP_STYLE
  200. osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);        
  201. #else
  202. osd_draw_rect(line*dvbpage/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);        
  203. #endif
  204. #endif
  205.         if (p_scan==1)
  206.   {
  207.     printf("-----no draw line---n");
  208.      #ifndef SPE_SETUP   //2004-4-21 02:05张宇P bmmm
  209. #ifndef DVB_MENU_SETUP_STYLE
  210.             osd_DrawLine((line*page)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(page+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 2);
  211. #else
  212.             osd_DrawLine((line*dvbpage)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(dvbpage+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 2);
  213. #endif
  214.         #endif    
  215.    }
  216.         else
  217.     {
  218.          printf("-----no draw line---n");
  219.          #ifndef SPE_SETUP    //2004-4-21 02:05张宇P bmmm
  220. #ifndef DVB_MENU_SETUP_STYLE
  221.             osd_DrawLine((line*page)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(page+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 1);
  222. #else
  223.             osd_DrawLine((line*dvbpage)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(dvbpage+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 1);
  224. #endif
  225.         #endif
  226.     }
  227.         #endif
  228.         
  229. #ifndef DVB_MENU_SETUP_STYLE
  230. #ifdef NO_AUDIO_PAGE
  231.         if (page<=MAX_SHOW_PAGE)
  232.         {
  233.             page++;
  234.             if(page==AUDPAGE)page++;
  235.         }
  236. #else
  237.         if (page<=MAX_SHOW_PAGE)
  238.             page++;
  239. #endif
  240. #ifndef SETUP_ALL_VALID     // alan, 2003/7/18 10:49