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

📄 menu.lst

📁 Maria2 CarTV 20060707 Tony
💻 LST
📖 第 1 页 / 共 4 页
字号:
 793          // draw guage
C51 COMPILER V8.01   MENU                                                                  11/28/2006 08:08:08 PAGE 14  

 794          void DrawOsdMenuItemGuage(BYTE itemIndex, DrawGuageType *gaugeItem)
 795          {
 796   1          if (itemIndex==g_ucMenuItemIndex)
 797   1              Osd_SetTextColor(gaugeItem->SelForeColor,gaugeItem->SelBackColor);
 798   1          else
 799   1              Osd_SetTextColor(gaugeItem->ForeColor,gaugeItem->BackColor);
 800   1      
 801   1          #define xPos        itemIndex
 802   1          xPos=gaugeItem->XPos;
 803   1          if (xPos==0xFF)
 804   1          {
 805   2              xPos=(OsdWindowWidth-gaugeItem->Length)/2;
 806   2          }
 807   1          Osd_DrawGuage(xPos, gaugeItem->YPos, gaugeItem->Length, gaugeItem->GetValue());
 808   1          #undef xPos
 809   1      }
 810          
 811          void DrawFullCenterText(BYTE xPos, BYTE yPos, BYTE *str)
 812          {
 813   1          BYTE i, len;
 814   1          if (xPos==0xFF)
 815   1          {
 816   2              len=strlen(str);
 817   2              xPos=(OsdWindowWidth-len)/2;
 818   2              for (i=2; i<xPos; i++)
 819   2                  Osd_DrawChar(i, yPos, ' ');
 820   2              for (i=xPos+len; i<OsdWindowWidth-2; i++)
 821   2                  Osd_DrawChar(i, yPos, ' ');
 822   2          }
 823   1          Osd_DrawStr(xPos, yPos, str);
 824   1      }
 825          
 826          //=========================================================================
 827          // draw radio
 828          void DrawOsdMenuItemRadioGroup(BYTE itemIndex, DrawRadioGroupType *radioItem)
 829          {
 830   1              RadioTextType *radioText;
 831   1              BYTE i=0;
 832   1              radioText=radioItem->RadioText;
 833   1              if (radioText)
 834   1          {
 835   2            if (radioItem->GetValue)
 836   2              i=radioItem->GetValue();
 837   2            if(radioItem->Flags&dwiSingleRadioItem)
 838   2            {
 839   3              radioText +=i;
 840   3              i=0;
 841   3            }
 842   2            while (1)
 843   2              { // set high color
 844   3                if (radioText->DisplayText)
 845   3                {
 846   4                  if(radioItem->Flags&dwiValueSelectRadioItemColor)
 847   4                    {
 848   5                    if(!i)
 849   5                      Osd_SetTextColor(radioText->SelForeColor,radioText->SelBackColor);
 850   5                    else
 851   5                      Osd_SetTextColor(radioText->ForeColor,radioText->BackColor);
 852   5                    }
 853   4                  else
 854   4                    {
 855   5                    if (itemIndex==g_ucMenuItemIndex)
C51 COMPILER V8.01   MENU                                                                  11/28/2006 08:08:08 PAGE 15  

 856   5                    {
 857   6                      Osd_SetTextColor(radioText->SelForeColor,radioText->SelBackColor);
 858   6                    }
 859   5                    else
 860   5                    {
 861   6                      Osd_SetTextColor(radioText->ForeColor,radioText->BackColor);
 862   6                    }
 863   5                    }
 864   4                      #ifdef Multi_language
                               if (IsVGAInUse()&&g_ucMenuPageIndex==PictureMenu&&itemIndex == 3)
                                      DrawFullCenterText(radioText->XPos, radioText->YPos-1, radioText->DisplayText());
                               else
                              #endif
 869   4                      DrawFullCenterText(radioText->XPos, radioText->YPos, radioText->DisplayText());
 870   4                }
 871   3                if (radioText->Flags&dwiEnd)
 872   3                  break;
 873   3                radioText ++;
 874   3                i--;
 875   3              }
 876   2          }
 877   1      }
 878          
 879          BYTE GetPrevItem(MenuItemType *menuItem)
 880          { signed char i;
 881   1      
 882   1        if (g_ucMenuItemIndex)
 883   1          { for (i=g_ucMenuItemIndex-1; i>=0; i--)
 884   2              {
 885   3                if (menuItem[i].Flags&mibVGADisable && IsVGAInUse())
 886   3                  continue;
 887   3                if (menuItem[i].Flags&mibFactoryItem && !FactoryModeFlag)
 888   3                  continue;
 889   3                if (menuItem[i].Flags&mibTVItem && !IsTVInUse())
 890   3                  continue;
 891   3                if (menuItem[i].Flags&mibVGAItem&& !IsVGAInUse())
 892   3                  continue;
 893   3      
 894   3                if (menuItem[i].Flags&mibConditionEnableItem&& !EnableTimeFlag)
 895   3                  continue;
 896   3      
 897   3                    if (menuItem[i].Flags&mibVGAItem&& IsVGAInUse() && SyncLossState())
 898   3                          continue;
 899   3      
 900   3                if (menuItem[i].Flags&mibSelectable)
 901   3                  return i;
 902   3              }
 903   2          }
 904   1        for (i=MenuItemCount-1; i>=0; i--)
 905   1          {
 906   2            if (menuItem[i].Flags&mibVGADisable && IsVGAInUse())
 907   2                continue;
 908   2            if (menuItem[i].Flags&mibFactoryItem && !FactoryModeFlag)
 909   2                continue;
 910   2      
 911   2                if (menuItem[i].Flags&mibConditionEnableItem&& !EnableTimeFlag)
 912   2                  continue;
 913   2      
 914   2            if (menuItem[i].Flags&mibTVItem && !IsTVInUse())
 915   2                continue;
 916   2            if (menuItem[i].Flags&mibVGAItem&& !IsVGAInUse())
 917   2                continue;
C51 COMPILER V8.01   MENU                                                                  11/28/2006 08:08:08 PAGE 16  

 918   2                if (menuItem[i].Flags&mibVGAItem&& IsVGAInUse() && SyncLossState())
 919   2                continue;
 920   2            if (menuItem[i].Flags&mibSelectable)
 921   2                return i;
 922   2          }
 923   1        return g_ucMenuItemIndex;
 924   1      }
 925          BYTE GetNextItem(MenuItemType *menuItem)
 926          {
 927   1          BYTE i;
 928   1      
 929   1          if (g_ucMenuItemIndex<MenuItemCount-1) // current item is not last item.
 930   1          {
 931   2              for (i=g_ucMenuItemIndex+1; i<MenuItemCount; i++)
 932   2              {
 933   3                if (menuItem[i].Flags&mibVGADisable && IsVGAInUse())
 934   3                  continue;
 935   3                if (menuItem[i].Flags&mibFactoryItem && !FactoryModeFlag)
 936   3                  continue;
 937   3      
 938   3                if (menuItem[i].Flags&mibConditionEnableItem&& !EnableTimeFlag)
 939   3                  continue;
 940   3      
 941   3                if (menuItem[i].Flags&mibTVItem && !IsTVInUse())
 942   3                  continue;
 943   3      
 944   3                if (menuItem[i].Flags&mibVGAItem&& !IsVGAInUse())
 945   3                  continue;
 946   3                  if (menuItem[i].Flags&mibVGAItem&& IsVGAInUse() && SyncLossState())
 947   3                      continue;
 948   3                if (menuItem[i].Flags&mibSelectable)
 949   3                  return i;
 950   3                  }
 951   2          }
 952   1      
 953   1          for (i=0; i<g_ucMenuItemIndex; i++)
 954   1          {
 955   2            if (menuItem[i].Flags&mibVGADisable && IsVGAInUse())
 956   2                  continue;
 957   2            if (menuItem[i].Flags&mibFactoryItem && !FactoryModeFlag)
 958   2              continue;
 959   2      
 960   2            if (menuItem[i].Flags&mibConditionEnableItem&& !EnableTimeFlag)
 961   2              continue;
 962   2      
 963   2            if (menuItem[i].Flags&mibTVItem && !IsTVInUse())
 964   2              continue;
 965   2      
 966   2            if (menuItem[i].Flags&mibVGAItem&& !IsVGAInUse())
 967   2              continue;
 968   2              if (menuItem[i].Flags&mibVGAItem&& IsVGAInUse() && SyncLossState())
 969   2              continue;
 970   2            if (menuItem[i].Flags&mibSelectable)
 971   2              return i;
 972   2          }
 973   1        return g_ucMenuItemIndex;
 974   1      }
 975          
 976          BYTE GetMenuItemIndex(BYTE g_ucMenuPageIndex)
 977          {
 978   1        g_ucMenuPageIndex=g_ucMenuPageIndex;
 979   1          return 0;
C51 COMPILER V8.01   MENU                                                                  11/28/2006 08:08:08 PAGE 17  

 980   1      }
 981          
 982          
 983          
 984          void DrawShowSourcemenu(void)
 985          {
 986   1      #if TV_ENABLE
 987   1              //printMsg("DrawShowSourcemenu");
 988   1      if(IsTVInUse())
 989   1              g_ucMenuPageIndex=ShowTVChannelMenu;
 990   1      else
 991   1      #endif
 992   1              g_ucMenuPageIndex=ShowSourceMenu;
 993   1      
 994   1              g_ucMenuItemIndex=0;
 995   1              ExecuteKeyEvent(MIA_RedrawMenu);
 996   1              ResetOsdTimer();
 997   1      }
 998          
 999          void ReDrawCurrentOSDItem(BYTE item)
1000          {
1001   1       DrawOsdMenuItem(item, &CurrentMenu.MenuItems[item]);
1002   1      }
1003          
1004          void MenuStatusCHK(void)
1005          {
1006   1              if (g_ucMenuPageIndex!=RootMenu)
1007   1                      return;
1008   1      
1009   1      #if VGA_ENABLE
1010   1          if(IsVGAInUse())
1011   1              return;
1012   1      #endif
1013   1      
1014   1              Clr_DynamiccaptionFlag();
1015   1      
1016   1              if (!(g_VdInfo.wVideoStatus &VD_HSYNC_LOCKED))
1017   1                      {
1018   2                              DrawShowSourcemenu();
1019   2                              g_ucOsdCounter=0;
1020   2                      }
1021   1              else
1022   1                      {
1023   2                        if (g_VideoSetting.MuteStatus)
1024   2                              {
1025   3                               g_ucMenuPageIndex=MuteMenu;
1026   3                               g_ucMenuItemIndex=0;
1027   3                               ExecuteKeyEvent(MIA_RedrawMenu);
1028   3                               g_ucOsdCounter=0;
1029   3                              }
1030   2                      }
1031   1      }
1032          
1033          #ifdef Multi_language
              void DrawSystemMenu(void)
              {
                      g_ucMenuPageIndex=PictureMenu;
                      g_ucMenuItemIndex=3;
                      ExecuteKeyEvent(MIA_RedrawMenu);
                      ResetOsdTimer();
              }
              #endif
C51 COMPILER V8.01   MENU                                                                  11/28/2006 08:08:08 PAGE 18  

1042          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   4997    ----
   CONSTANT SIZE    =   3039    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      2      58
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  1 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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