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

DVD

开发平台:

C/C++

  1. /***************************************************************
  2. *  setup_show_page.c
  3. *  include  in setup_tab_ui1.c   when defined DVD_SETUP_REENG
  4. * Creator:  JSLin 
  5. * Date:         2004/07/28
  6. *
  7. * Description : 
  8. *           setup menu precentation engine, 
  9. *           1. transform content into GUI   
  10. *
  11. ****************************************************************/
  12. void setup_ShowPage(void);
  13. void setup_ShowPageL1(void);
  14. void setup_ShowPageL2(void);
  15. void setup_ShowPageL3(void);
  16. void setup_ExitPage(void);
  17. void setup_ShowPageCUSTM(void);
  18. void setup_ShowCUSTMMsg(void);
  19. void setup_ShowPage(void)
  20. {
  21.     //printf("nnsetup_show_pagen");
  22.     // setup position has no changed, no need to re-draw
  23.     if((setup_pos[0] == setup_last_pos[0]) && (setup_pos[1] == setup_last_pos[1])
  24.         &&(setup_pos[2] == setup_last_pos[2]) && (setup_pos[3] == setup_last_pos[3]))
  25.     {
  26.         return;
  27.     }
  28.     if(full_scrn&CUSTM)
  29.     {
  30.         setup_ShowPageCUSTM();
  31.         return;
  32.     }
  33.     // level 1, show page title and icon bar
  34.     if(((setup_pos[SETUP_ML0] == 1) && (setup_last_pos[SETUP_ML0] <= 1 ))||(setup_pos[1]!=setup_last_pos[1]))
  35.     {
  36.         setup_ShowPageL1();
  37.         #ifdef SHOW_SETUPMENU_SETUP //denghangao 20040929
  38.            show_setupmenu();
  39.         #endif
  40.         
  41.     }
  42.     // level 2, show page items
  43.     if(!((setup_pos[SETUP_ML0] == SETUP_ML3) && (setup_last_pos[SETUP_ML0] == SETUP_ML3)))
  44.     {
  45.         setup_ShowPageL2();
  46.     }
  47.     
  48.     // level 3, show item selections
  49.     if(setup_pos[SETUP_ML0] > SETUP_ML1)
  50.     {
  51.         setup_ShowPageL3();
  52.     }
  53. }//end of setup_show_menu
  54. //====================================================================
  55. void setup_ShowPageL1(void)
  56. {
  57.     int     i;
  58.     #ifdef  SETUP_COLOR_TYPE1   //wangfeng 2003-08-29 17:28
  59.     UINT16 line=SETUP_MAX_WIDTH*16;
  60.     #else
  61.     UINT16 line=SETUP_MAX_WIDTH*16-20;
  62.     #endif
  63.     #ifndef  SETUPMENU_16Mb_NO_ICON
  64.     //printf("nnsetup_show_page_L1n");
  65.     //draw rectangulars
  66.     osd_draw_rect(0, 0, (SETUP_MAX_WIDTH*16), 10+SETUP_BUTTON_HEIGHT+12, setupBGcolorH);                
  67.     osd_draw_rect(10, 10, line, SETUP_BUTTON_HEIGHT+12,setupBGcolorI); 
  68.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT+12, line+20, SETUP_BUTTON_HEIGHT+8, setupBGcolorT);
  69.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT*2+20, (SETUP_MAX_WIDTH*16), (SETUP_MAX_LINE*SETUP_BUTTON_HEIGHT), setupBGcolorB);                
  70.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT*2+20, (SETUP_MAX_WIDTH*16), 2, setupBGcolorSL);                
  71.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT*2+10+(SETUP_MAX_LINE*SETUP_BUTTON_HEIGHT)-100, (SETUP_MAX_WIDTH*16), 18, setupBGcolorF);
  72.     
  73.     // show page title
  74.     const char *str;
  75.     str = _OsdMessegeFont1[osd_font_mode][setup_item[setup_pos[SETUP_ML1]][0][1]];
  76.     osd_DrawString(setup_item[setup_pos[1]][0][3], 2, str, setupFcolorT, setupBGcolorT);
  77.     #else//denghg   draw rectangulars  2004-9-28 13:50
  78.     osd_draw_rect(0, 0, (SETUP_MAX_WIDTH*16), 10+SETUP_BUTTON_HEIGHT+12, setupBGcolorH);                
  79.     osd_draw_rect(10, 10, line, SETUP_BUTTON_HEIGHT+12,setupBGcolorI); 
  80.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT+12, line+20, SETUP_BUTTON_HEIGHT+8, setupBGcolorT);
  81.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT*2+20, (SETUP_MAX_WIDTH*16), (SETUP_MAX_LINE*SETUP_BUTTON_HEIGHT),setupBGcolorB);                
  82.     // osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT*2+20, (SETUP_MAX_WIDTH*16), 2, setupBGcolorSL);                
  83.     osd_draw_rect(0, 10+SETUP_BUTTON_HEIGHT*2+10+(SETUP_MAX_LINE*SETUP_BUTTON_HEIGHT)-100, (SETUP_MAX_WIDTH*16), 18, setupBGcolorF);
  84.  
  85.     //DENGHG  SHOW  CURSOR 2004-9-28 16:13 
  86.     osd_draw_rect((setup_pos[SETUP_ML1])*line/setup_max_icon, 10, line/setup_max_icon+10,SETUP_BUTTON_HEIGHT+12, setupCURSOR);
  87.     #endif//
  88.     // draw icon bar or  setupIconString  //denghg  2004-9-28 20:18
  89.     for(i=0; i<setup_max_icon; i++)
  90.     {       
  91.          #ifdef SETUPMENU_16Mb_NO_ICON
  92.            const char *setupIconString[MAX_SETUP_PAGE]={"SYS","LAN","AUD","VID","SPE","DIG"};
  93.            osd_DrawSetupIconString(setup_item[i][0][4], 13,setupIconString[setup_item[i][0][2]],IconStringTCOLOR,IconStringBGCOLOR);                         
  94.          #else
  95.            osd_DrawIcon(setup_item[i][0][4], 13, setup_item[i][0][2], setup_item[setup_pos[SETUP_ML1]][0][2]);       
  96.            //printf("setup_pos[SETUP_ML1]=%4dn",setup_pos[SETUP_ML1]);  
  97.          #endif             
  98.     }
  99.    
  100. }
  101. //====================================================================
  102. void setup_ShowPageL2(void)
  103. {
  104.     int     i;
  105.     BYTE    xStart, yStart, xLen;//, xOffset, fColor, bgColor, upDown;
  106.     //const char   *str;    
  107.     //printf("nnsetup_show_page_L2n");
  108.     yStart = 0;
  109.     //for setup_level = 1, left/right walking on page(1st) level, just list all items of this page
  110.     if(((setup_pos[SETUP_ML2] == 0) && (setup_pos[SETUP_ML0] == SETUP_ML1))
  111.         ||setup_refresh) 
  112.     {            
  113.         //clear level 2 area
  114.         osd_draw_rect(10, 10+SETUP_BUTTON_HEIGHT*2+22, (SETUP_MAX_WIDTH*8)-16, (MAX_PAGE_ITEM*SETUP_BUTTON_HEIGHT)+10, setupBGcolorL2);
  115.         //clear level 3 area
  116.         #ifndef SHOW_SETUPMENU_SETUP//denghangao 20040929
  117.         osd_draw_rect((SETUP_MAX_WIDTH*8)-8, 10+SETUP_BUTTON_HEIGHT*2+22, (SETUP_MAX_WIDTH*8)-10, (MAX_PAGE_ITEM*SETUP_BUTTON_HEIGHT)+10, setupBGcolorL3);
  118.         #endif
  119. xStart = SETUP_MENU_XSTART;
  120.         xLen = SETUP_SUB_XSTART-SETUP_MENU_XSTART-1;
  121.         setup_itemType= SETUP_itemNormal;
  122.         
  123.         for(i=1; i<=MAX_PAGE_ITEM; i++)
  124.         {
  125.          if((setup_item[setup_pos[1]][i][0]!=SET_NE)&&(setup_item[setup_pos[1]][i][0]!=SET_SPACE))
  126.          {
  127.              yStart = SETUP_MENU_YSTART + i;
  128.              id = setup_item[setup_pos[SETUP_ML1]][i][1];
  129.              setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  130.             }
  131.         }
  132.     }
  133.     //for setup_level =2, up/down walking on item(2nd) level, highlight the corresponding item
  134.     if(setup_pos[SETUP_ML0] == SETUP_ML2)
  135.     {
  136.         //clear level 3 area
  137.         osd_draw_rect((SETUP_MAX_WIDTH*8)-8, 10+SETUP_BUTTON_HEIGHT*2+22, (SETUP_MAX_WIDTH*8)-10, (MAX_PAGE_ITEM*SETUP_BUTTON_HEIGHT)+10, setupBGcolorL3);
  138.         xStart = SETUP_MENU_XSTART;
  139.         xLen = SETUP_SUB_XSTART-SETUP_MENU_XSTART-1;
  140.             
  141.         //unmark last located item
  142.         if(setup_last_pos[SETUP_ML2] != 0)
  143.         {
  144.             yStart = SETUP_MENU_YSTART + setup_last_pos[SETUP_ML2];
  145.             id = setup_item[setup_last_pos[SETUP_ML1]][setup_last_pos[SETUP_ML2]][1];
  146.             setup_itemType= SETUP_itemNormal;
  147.             setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  148.         }
  149.         // mark current located item
  150.         if(setup_pos[SETUP_ML2] != 0)
  151.         {
  152.             yStart = SETUP_MENU_YSTART + setup_pos[SETUP_ML2];      
  153.             id = setup_item[setup_pos[SETUP_ML1]][setup_pos[SETUP_ML2]][1];
  154.             setup_itemType= SETUP_itemMark;
  155.             setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  156.         }
  157.         //draw arrow
  158.         if((setup_item[setup_pos[1]][setup_pos[2]][0]!=SET_SH)&&(setup_item[setup_pos[1]][setup_pos[2]][0]!=SET_LINK))
  159.         {
  160.             osd_DrawString(SETUP_SUB_XSTART-1, yStart, Ch_arrorR, setupFcolorAL2, setupBGcolorAL2);
  161.         }
  162.     }
  163.     // for setup_level from 2 to 3, change the color of selected item
  164.     if((setup_pos[0] == SETUP_ML3) && (setup_last_pos[0] == SETUP_ML2))
  165.     {
  166.                 xStart = SETUP_MENU_XSTART;
  167.         xLen = SETUP_SUB_XSTART-SETUP_MENU_XSTART-1;
  168.         
  169.         yStart = SETUP_MENU_YSTART + setup_pos[SETUP_ML2];
  170.         id = setup_item[setup_pos[1]][setup_pos[2]][1];
  171.         setup_itemType = SETUP_itemSelected;
  172.         setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  173.         //draw arrow
  174.         osd_DrawString(SETUP_SUB_XSTART-1, yStart, Ch_arrorR, setupFcolorAL3, setupBGcolorAL3);
  175.     }
  176. }
  177. //====================================================================
  178. void setup_ShowPageL3(void)
  179. {
  180.     int         i;//, j;
  181.     BYTE    xStart, yStart, xLen;//, xOffset, fColor, bgColor, upDown;
  182.     UINT8   itemType, itemSel;
  183.         
  184.     //printf("nnsetup_show_page_L3n");
  185.     itemType = setup_item[setup_pos[1]][setup_pos[2]][0];
  186.     xStart = SETUP_SUB_XSTART;
  187.     xLen = SETUP_MAX_WIDTH-SETUP_SUB_XSTART-2;
  188.     
  189.     //for setup_level = 2, up/down walking on item(2nd) level, just list all selection of this item 
  190.     if(setup_pos[0] == SETUP_ML2)
  191.     {
  192.         switch(itemType)
  193.         {
  194.             case SET_FUNC:
  195.                         itemSel = setup_sel[setup_pos[1]][setup_pos[2]];
  196.                 for(i=2; i<MAX_ITEM_SEL; i++)
  197.                 {
  198.                     id = setup_item[setup_pos[1]][setup_pos[2]][i];
  199.                     if (id == 0) break;
  200.                     yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+i+1;
  201.                     if(itemSel==i)
  202.                         setup_itemType= SETUP_itemSelected;
  203.                     else
  204.                         setup_itemType= SETUP_itemNormal;
  205.                     
  206.                     setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  207.                 }
  208.                 break;
  209.             case SET_SCALE:
  210.                 id = setup_item[setup_pos[1]][setup_pos[2]][1];
  211.                 setup_DrawScaleForm( id, 0);
  212.                 setup_DrawScaleCursor(id, 0);
  213.                 break;
  214.             case SET_NM:
  215.                 setup_pos[3] = setup_sel[setup_pos[1]][setup_pos[2]];
  216.                 id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  217.                 yStart = setup_pos[2]+SETUP_MENU_YSTART;
  218.                 setup_itemType = SETUP_itemSelected;
  219.                 setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  220.                 break;
  221.                 
  222.             case SET_SH:
  223.             case SET_NE:
  224.             case SET_SPACE:
  225.                 break;
  226.         }
  227.     }
  228.     //for setup_level from 2 to 3
  229.     if((setup_pos[0] == SETUP_ML3) && (setup_last_pos[0] == SETUP_ML2))
  230.     {
  231.         switch(itemType)
  232.         {
  233.             case SET_FUNC:
  234.                 id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  235.                 yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+setup_pos[3]+1;
  236.                 
  237.                 setup_itemType= SETUP_itemMark;
  238.                 setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  239.                 break;
  240.             case SET_SCALE:
  241.                 id = setup_item[setup_pos[1]][setup_pos[2]][1];
  242.                 setup_DrawScaleForm( id, 1);
  243.                 setup_DrawScaleCursor(id, 1);
  244.                 break;
  245.             case SET_NM:
  246.                 id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  247.                 yStart = setup_pos[2]+SETUP_MENU_YSTART;
  248.                 setup_itemType= SETUP_itemMark;
  249.                 setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  250.                 break;
  251.         }
  252.     }
  253.     //for setup_level =3, up/down walking on selection(3rd) level, highlight the corresponding selection
  254.     if((setup_pos[0] == SETUP_ML3) && (setup_last_pos[0] == SETUP_ML3))
  255.     {
  256.         switch(itemType)
  257.         {
  258.             case SET_FUNC:
  259.                     //unmark last selection
  260.                     {
  261.                         itemSel = setup_sel[setup_pos[1]][setup_pos[2]];
  262.                         if(itemSel == setup_last_pos[3]) 
  263.                             setup_itemType = SETUP_itemSelected;
  264.                         else 
  265.                             setup_itemType = SETUP_itemNormal;
  266.                         
  267.                         id = setup_item[setup_last_pos[1]][setup_last_pos[2]][setup_last_pos[3]];
  268.                         yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+setup_last_pos[3]+1;
  269.                         setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  270.                     }
  271.                     //mark current selection
  272.                     {
  273.                         id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  274.                         yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+setup_pos[3]+1;
  275.                         setup_itemType = SETUP_itemMark;
  276.                         setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  277.                     }
  278.                 break;
  279.             case SET_SCALE:
  280.                 id = setup_item[setup_last_pos[1]][setup_last_pos[2]][setup_last_pos[3]];
  281.                 setup_DrawScaleCursor(id, 1);
  282.                 break;
  283.         }
  284.     }
  285. }
  286. void setup_ExitPage(void)
  287. {
  288.     ExitSetupPage(1);
  289.     run_save_total_sel();
  290.     //printf("run_save_total_sel()n");
  291. }
  292. //====================================================================
  293. void setup_ShowPageCUSTM(void)
  294. {
  295.     int     i;//, j;
  296.     BYTE    xStart, yStart, xLen;//, xOffset, fColor, bgColor, upDown;
  297.     UINT8   itemType, itemSel;
  298.     char buf[8];
  299.     yStart=0;
  300.     itemType = setup_item[setup_pos[1]][setup_pos[2]][0];
  301.     //draw CUSTM page level_1 and level_2
  302.     if(setup_last_pos[0]==0)
  303.     {
  304.         osd_draw_rect(0, 0, (SETUP_MAX_WIDTH*16), (SETUP_MAX_LINE*SETUP_BUTTON_HEIGHT), setupBGcolorCUSTM);                
  305.                 
  306.         //level_2
  307.         xStart = SETUP_MENU_XSTART;
  308.         xLen = SETUP_SUB_XSTART-SETUP_MENU_XSTART-1;
  309.         setup_itemType= SETUP_itemNormal;
  310.         
  311.         for(i=1; i<=MAX_PAGE_ITEM; i++)
  312.         {
  313.             yStart = SETUP_MENU_YSTART + i;
  314.             id = setup_item[setup_pos[SETUP_ML1]][i][1];
  315.             setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  316.         }
  317.         setup_ShowCUSTMMsg();
  318.     }
  319. //====================================================================
  320.     //for setup_level =2, up/down walking on item(2nd) level, highlight the corresponding item
  321.     if(setup_pos[SETUP_ML0] == SETUP_ML2)
  322.     {
  323.         //clear level 3 area
  324.         osd_draw_rect((SETUP_SUB_XSTART-1)*16,
  325.                         (SETUP_MENU_YSTART+2)*SETUP_BUTTON_HEIGHT+31,
  326.                         (SETUP_MAX_WIDTH-SETUP_SUB_XSTART-1)*16,
  327.                         (SETUP_MAX_LINE-SETUP_MENU_YSTART)*SETUP_BUTTON_HEIGHT-68,
  328.                         setupBGcolorCUSTM);
  329.         xStart = SETUP_MENU_XSTART;
  330.         xLen = SETUP_SUB_XSTART-SETUP_MENU_XSTART-1;
  331.             
  332.         //unmark last located item
  333.         if(setup_last_pos[SETUP_ML1] == setup_page_CUS)
  334.         {
  335.             yStart = SETUP_MENU_YSTART + setup_last_pos[SETUP_ML2];
  336.             id = setup_item[setup_last_pos[SETUP_ML1]][setup_last_pos[SETUP_ML2]][1];
  337.             setup_itemType = SETUP_itemNormal;
  338.             setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  339.         }
  340.         // mark current located item
  341.         if(setup_pos[SETUP_ML2] != MAX_PAGE_ITEM)
  342.         {
  343.             yStart = SETUP_MENU_YSTART + setup_pos[SETUP_ML2];      
  344.             id = setup_item[setup_pos[SETUP_ML1]][setup_pos[SETUP_ML2]][1];
  345.             setup_itemType = SETUP_itemMark;
  346.             setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  347.         }
  348.         //draw ">>" between located item and it's corresponding selection area
  349.         if((setup_item[setup_pos[1]][setup_pos[2]][0]!=SET_SH)&&(setup_item[setup_pos[1]][setup_pos[2]][0]!=SET_LINK))
  350.         {
  351.             osd_DrawString(SETUP_SUB_XSTART-1, yStart, Ch_arrorR, setupFcolorAL2, setupBGcolorAL2);
  352.         }
  353.         //level_3
  354.         xStart = SETUP_SUB_XSTART;
  355.         xLen = SETUP_MAX_WIDTH-SETUP_SUB_XSTART-2;
  356.         
  357.         switch(itemType)
  358.         {
  359.             case SET_FUNC:
  360.                 itemSel = setup_sel[setup_pos[1]][setup_pos[2]];
  361.                 
  362.                 for(i=2; i<MAX_ITEM_SEL; i++)
  363.                 {
  364.                     id = setup_item[setup_pos[1]][setup_pos[2]][i];
  365.                     if (id == 0) break;
  366.                     yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+i+1;
  367.                     if(itemSel==i)
  368.                         setup_itemType= SETUP_itemSelected;
  369.                     else
  370.                         setup_itemType= SETUP_itemNormal;
  371.                     setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  372.                 }
  373.                 break;
  374.             case SET_NM:
  375.                 setup_pos[3] = setup_sel[setup_pos[1]][setup_pos[2]];
  376.                 yStart = setup_pos[2]+SETUP_MENU_YSTART;
  377.                 #ifdef SETUP_6_DIGIT_PASSWORD
  378.                     psprintf(buf, "%06d", UserSet.parent_passwd);
  379.                 #else
  380.                     psprintf(buf, "%04d", UserSet.parent_passwd);
  381.                 #endif
  382.                 osd_DrawString(xStart+1, yStart, buf, setupFcolorSS, setupBGcolorCUSTM);
  383.                 break;
  384.             case SET_SH:
  385.             case SET_NE:
  386.             case SET_SPACE:
  387.                 break;
  388.         }       
  389.     }
  390. //==========================================================================
  391.     
  392.     // for setup_level from 2 to 3, change the color of selected item
  393.     if((setup_pos[0] == SETUP_ML3) && (setup_last_pos[0] == SETUP_ML2))
  394.     {
  395.         xStart = SETUP_MENU_XSTART;
  396.         xLen = SETUP_SUB_XSTART-SETUP_MENU_XSTART-1;
  397.         yStart = SETUP_MENU_YSTART + setup_pos[SETUP_ML2];
  398.         id = setup_item[setup_pos[1]][setup_pos[2]][1];
  399.         setup_itemType = SETUP_itemSelected;
  400.         setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  401.         osd_DrawString(SETUP_SUB_XSTART-1, yStart, Ch_arrorR, setupFcolorAL3, setupBGcolorAL2);
  402.         //level_3
  403.         xStart = SETUP_SUB_XSTART;
  404.         xLen = SETUP_MAX_WIDTH-SETUP_SUB_XSTART-2;
  405.     
  406.         switch(itemType)
  407.         {
  408.             case SET_FUNC:
  409.                 id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  410.                 yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+setup_pos[3]+1;
  411.                 setup_itemType = SETUP_itemMark;
  412.                 setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  413.                 break;
  414.             case SET_NM:
  415.                 setup_pos[3] = setup_sel[setup_pos[1]][setup_pos[2]];
  416.                 id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  417.                 yStart = setup_pos[2]+SETUP_MENU_YSTART;
  418.                 #ifdef SETUP_6_DIGIT_PASSWORD
  419.                     psprintf(buf, "%06d", UserSet.parent_passwd);
  420.                 #else
  421.                     psprintf(buf, "%04d", UserSet.parent_passwd);
  422.                 #endif
  423.                 osd_draw_setup_button(xStart,yStart,xLen, setupBGcolorSM, 1);
  424.                 osd_DrawString(xStart+1, yStart, buf, setupFcolorSM, setupBGcolorSM);
  425.                 break;
  426.         }
  427.     }   
  428. //================================================================================
  429.     //for setup_level =3, up/down walking on selection(3rd) level, highlight the corresponding selection
  430.     if((setup_pos[0] == SETUP_ML3) && (setup_last_pos[0] == SETUP_ML3))
  431.     {
  432.         xStart = SETUP_SUB_XSTART;
  433.         xLen = SETUP_MAX_WIDTH-SETUP_SUB_XSTART-2;
  434.         //xOffset = 1;
  435.         
  436.         switch(itemType)
  437.         {
  438.             case SET_FUNC:
  439.                 //unmark last selection
  440.                 if(setup_last_pos[SETUP_ML1] == setup_page_CUS)
  441.                 {
  442.                     itemSel = setup_sel[setup_pos[1]][setup_pos[2]];
  443.                     if(itemSel == setup_last_pos[3]) 
  444.                         setup_itemType= SETUP_itemSelected;
  445.                     else
  446.                         setup_itemType = SETUP_itemNormal;
  447.                     
  448.                     id = setup_item[setup_last_pos[1]][setup_last_pos[2]][setup_last_pos[3]];
  449.                     yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+setup_last_pos[3]+1;
  450.                     setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  451.                 }
  452.                 //mark current selection
  453.                 {
  454.                     id = setup_item[setup_pos[1]][setup_pos[2]][setup_pos[3]];
  455.                     yStart = setup_item[setup_pos[1]][setup_pos[2]][MAX_ITEM_SEL]+setup_pos[3]+1;
  456.                     setup_itemType= SETUP_itemMark;
  457.                     setup_draw_item(xStart, yStart, xLen, id, setup_itemType);
  458.                 }
  459.                 break;
  460.         }
  461.     }
  462.     if(setup_item[setup_pos[SETUP_ML1]][setup_pos[SETUP_ML2]][1]!=STR_OS_RATING) //dengh add FOR RATING_8 2004-10-13 8:46
  463.     setup_ShowCUSTMMsg();
  464. }
  465. //====================================================================
  466. void setup_ShowCUSTMMsg(void)
  467. {
  468.     BYTE    buf[40];
  469.     BYTE    *pVersion;
  470. #ifdef DVD_SERVO
  471.     extern const UINT8 ServoVersion[];
  472. #endif
  473.     extern const UINT8 KernelVersion[];     // moved to libkern.a, leochen 2004/4/19 09:43