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

DVD

开发平台:

C/C++

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