⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup_ui_right.c

📁 Sunplus 8202S source code.
💻 C
字号:
void setup_func_right(void)
{
#ifdef SETUP_DONGLI459          //dingzhy  for  tonic  2004-2-10 22:56
if(ShowPasswordErr)
ShowPasswordErr=0;
#endif

    const char *str;
    UINT16 line = 0;

    #ifdef DVB_MENU_SETUP_STYLE    
    //if(((page == INSTALLPAGE)||(page == CHANNELPAGE))&&(setupLevel)&&(system_state == SYSTEM_TS))
    if(IsDvbStateNoSubMenu())   //In Dvb Mode, Level 1 has no sub item
        return;
    #endif
    
    #ifdef SUPPORT_FUNCTION_MENU
    if(full_scrn&SETUP_PLUS)
    {
      #ifdef DEBUG_FUNCTION_MENU
      printf("right key press,index_y:%d,index_y2:%d",index_y,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_Display_Menu())
      {
        exe_display_function(1);
        return;
      }
      #endif
      
      if(index_y != 2)
        return;
    
      //if(setup_item_plus[page][index_y][0] == SET_FUNC)
      {//LCD mode

      //change string color of current selection item in selection area
      submenuStart = index_y + SETUP_MENU_YSTART_PLUS;
    
        {
            BYTE i;
            //绘制箭头
            #ifdef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 17:12
            osd_DrawString(SETUP_SUB_XSTART_PLUS-1, index_y+SETUP_MENU_YSTART_PLUS, Ch_arrorR, SANTIFONTCOLOR, SBGCOLOR);
            #else
            osd_DrawString(SETUP_SUB_XSTART_PLUS-1, index_y+SETUP_MENU_YSTART_PLUS, Ch_arrorR, SFONTCOLOR, SBGCOLOR);
            #endif
            //将子菜单绘出来!
            for (i=2; i<MAX_ITEM_SEL_PLUS; i++) 
            {
              sel = setup_sel_plus[page][index_y];
              id = setup_item_plus[page][index_y][i];
              if (id==0) break;
            
              ShowSel(SETUP_SUB_XSTART_PLUS, (i-2+submenuStart), SETUP_MAX_WIDTH_PLUS-SETUP_SUB_XSTART_PLUS,sel == i);
            }
        }
        //将之前标中的菜单项转为正常显示
        #ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 15:39 
        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);
        #endif
        id = setup_item_plus[page][index_y][1];
        str = _OsdMessegeFont1[osd_font_mode][id];
        osd_DrawString(SETUP_MENU_XSTART_PLUS+1, index_y+SETUP_MENU_YSTART_PLUS, str, SDEFAULTCOLOR,SBGCOLOR);

       
    
      sel=setup_sel_plus[page][index_y];
    
      index_y2 = sel-2;
    
        //反显子菜单的菜单项以表示选中
        id = setup_item_plus[page][index_y][index_y2+2];
        str = setup_SetItemString();
        #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, SANTIBGCOLOR, 1);
        #endif
        osd_DrawString(SETUP_SUB_XSTART_PLUS+1, index_y2+submenuStart, str, SANTIFONTCOLOR, SANTIBGCOLOR);
        
      setupLevel = 2;
    }
    }
    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              
    
    #ifdef SUPPORT_FUNCTION_MENU
    #ifdef SUPPORT_SPI
    if (setup_item[page][index_y+index_y_start][0] == SET_SHOW) 
      return;
    #endif
    #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)    
        UINT16 line=SETUP_MAX_WIDTH*16-20;  
        SetOsdCol(0,0,SANTIBGCOLOR,0xc0c0c0e0); 
    #else
    UINT16 line=SETUP_MAX_WIDTH*16-20;
    SetOsdCol(0,0,SANTIBGCOLOR,0xa346ffc0);
    #endif*/
    
#ifdef  SETUP_COLOR_TYPE1   //wangfeng 2003-08-29 17:28
    line=SETUP_MAX_WIDTH*16;
    SetOsdCol(0,0,SANTIBGCOLOR,0x78501e90);
#elif defined(SETUP_COLOR_TYPE2)
    #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
    if(!main_setup)
    #endif
    {
        //SetOsdCol(0,0,SANTIBGCOLOR,0xc0c0c0e0);
        SetOsdCol(0,0,SANTIBGCOLOR,0xa346ffc0);
        line=SETUP_MAX_WIDTH*16-20;
    }
#else
    #ifdef HANYANG_SETUPMENU//caoh2004-6-18 11:17
    line=SETUP_MAX_WIDTH*16+260;
    #else
     line=SETUP_MAX_WIDTH*16-20;
    #endif
    #ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-2 17:38
    SetOsdCol(mn_osd_col2);       //2004-4-17 01:45张宇P
   #endif
#endif

#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE         //right
    if (main_setup)
    {
        switch(index_x)
        {
            case ONE_KEY_PASS_X :
                draw_setup_Btn_HL( 1, ONE_KEY_PASS_X*11, ONE_KEY_PASS_Y*4, 8* 24, 1*32,4,MAIN_SETUP_PAGE_BGCOLOR);  
                index_x = SETUP_X;
                draw_setup_Btn_HL( 1,SETUP_X*14+28, SETUP_Y*4, 8* 24, 1*32,4,SETUP_HL_COLOR);
                break;
            case SETUP_X:
                draw_setup_Btn_HL( 1,SETUP_X*14+28, SETUP_Y*4, 8* 24, 1*32,4,MAIN_SETUP_PAGE_BGCOLOR);
                index_x = 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,SETUP_HL_COLOR);       
                break;
            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 = SETUP_X;
                draw_setup_Btn_HL( 1,SETUP_X*14+28, SETUP_Y*4, 8* 24, 1*32,4,SETUP_HL_COLOR);
                break;
        }
        return;
    }
#endif
    
    if ((setupLevel==0)
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE         
        &&(!one_key_pass_flag)
#endif  
        )  
    {
        //#if defined(SAME_DISC_RESUME)||defined(SHOW_STANDBY_TIMER)
        #if defined(NEXTPAGE_SYS)       //freyman 2004-3-26 0:06
        if(page==SysNextPage) page=0;
        #endif

        // make tab disable
#ifndef SETUP_COLOR_TYPE1
#ifdef SETUP_COLOR_TYPE2
osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+7, 13);
#else
          #if !defined(SPE_SETUP) && !defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-4 14:17 //2004-4-21 02:05张宇P bmmm
#ifndef DVB_MENU_SETUP_STYLE
        osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
#else
        osd_draw_rect(line*dvbpage/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);
#endif
        
#endif
#endif
       #endif

//      #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-4 14:17
#ifdef SPE_SETUP      //2004-4-21 02:05张宇P bmmm
        // 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);
         if(page<3)
         #ifdef HANYANG_SETUPMENU//caoh2004-6-18 11:35
         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);
         #else
         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);
         #endif
         else
        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);
#else
#ifndef DVB_MENU_SETUP_STYLE
osd_draw_rect(line*page/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);        
#else
osd_draw_rect(line*dvbpage/6+13, 11+1, line/6-4, SETUP_BUTTON_HEIGHT+9, 1);        
#endif
#endif
        if (p_scan==1)
  {
    printf("-----no draw line---\n");
     #ifndef SPE_SETUP   //2004-4-21 02:05张宇P bmmm
#ifndef DVB_MENU_SETUP_STYLE
            osd_DrawLine((line*page)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(page+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 2);
#else
            osd_DrawLine((line*dvbpage)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(dvbpage+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 2);
#endif

        #endif    
   }
        else
    {
         printf("-----no draw line---\n");
         #ifndef SPE_SETUP    //2004-4-21 02:05张宇P bmmm
#ifndef DVB_MENU_SETUP_STYLE
            osd_DrawLine((line*page)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(page+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 1);
#else
            osd_DrawLine((line*dvbpage)/6+11, SETUP_BUTTON_HEIGHT+20, (line*(dvbpage+1))/6+9, SETUP_BUTTON_HEIGHT+20, SWHITECOLOR, 1);
#endif
        #endif
    }
        #endif
        
#ifndef DVB_MENU_SETUP_STYLE
#ifdef NO_AUDIO_PAGE
        if (page<=MAX_SHOW_PAGE)
        {
            page++;
            if(page==AUDPAGE)page++;
        }
#else
        if (page<=MAX_SHOW_PAGE)
            page++;
#endif

#ifndef SETUP_ALL_VALID     // alan, 2003/7/18 10:49

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -