home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 January / Gamestar_69_2005-01_dvd.iso / Dema / theprojectv1-0.exe / FCData / Scripts.pak / Scripts / UIScreens / BenchmarkResults.lua next >
Encoding:
Text File  |  2004-10-28  |  4.0 KB  |  186 lines

  1.  
  2. -- get the list of videofiles
  3. szScriptFolder = "Scripts/UIScreens/";
  4.  
  5. -- Load Configuration
  6. Script:LoadScript(szScriptFolder.."UISystemCfg.lua", 1);                -- Load Configuration File
  7.  
  8. -- Load the skin
  9. Script:LoadScript(UI.szSkinPath, 1);
  10.  
  11. UI.PageBenchmarkResults=
  12. {    
  13.     GUI=
  14.     {
  15.  
  16. -- ------------------------- Current Result -------------------------
  17.  
  18.         Result_Background =
  19.         {
  20.             classname = "static",
  21.             left = 230, top = 100,
  22.             width = 340, height = 400,
  23.             
  24.             color = UI.szMessageBoxScreenColor,
  25.             
  26.             zorder = -1,
  27.         },
  28.         
  29.         Result_Label =
  30.         {
  31.             skin = UI.skins.Label,
  32.             left = 245, top = 105,
  33.             width = 310, height = 32,
  34.  
  35.             text = "Benchmark Result",
  36.             fontname = "UI_Default_Bold",
  37.             fontsize = 18,
  38.             halign = UIALIGN_CENTER,
  39.         },
  40.         
  41.         Result_Separator =
  42.         {
  43.             classname = "static",
  44.             left = 245, top = 142,
  45.             width = 310, height = 5,
  46.  
  47.             texture     = System:LoadImage("Textures/GUI/Titlebar"),
  48.             halign = UIALIGN_CENTER,
  49.         
  50.         },
  51.         
  52.         --Time_Label =
  53.         --{
  54.         --    skin = UI.skins.Label,
  55.         --    left = 260, top = 182,
  56.         --    width = 295, height = 20,
  57.  
  58.         --    text = "Time Elapsed: 0min 0sec",
  59.         --    fontname = "UI_Default_Bold",
  60.         --    fontsize = 14,
  61.         --    halign = UIALIGN_LEFT,
  62.         --},
  63.         
  64.         FPS_Label =
  65.         {
  66.             skin = UI.skins.Label,
  67.             left = 260, top = 202,
  68.             width = 295, height = 20,
  69.  
  70.             text = "??.? frames per second",
  71.             fontname = "UI_Default_Bold",
  72.             fontsize = 14,
  73.             halign = UIALIGN_LEFT,
  74.         },
  75.         
  76.         Settings_Label =
  77.         {
  78.             skin = UI.skins.Label,
  79.             left = 260, top = 282,
  80.             width = 295, height = 20,
  81.  
  82.             text = "Settings:",
  83.             fontname = "UI_Default_Bold",
  84.             fontsize = 14,
  85.             halign = UIALIGN_LEFT,
  86.         },
  87.         
  88.         Config_Res_Label =
  89.         {
  90.             skin = UI.skins.Label,
  91.             left = 275, top = 302,
  92.             width = 280, height = 20,
  93.  
  94.             text = "1024x768 with 32bit color",
  95.             fontname = "UI_Default",
  96.             fontsize = 12,
  97.             halign = UIALIGN_LEFT,
  98.         },
  99.         
  100.         Config_FSAA_Label =
  101.         {
  102.             skin = UI.skins.Label,
  103.             left = 275, top = 322,
  104.             width = 280, height = 20,
  105.  
  106.             text = "?x FSAA",
  107.             fontname = "UI_Default",
  108.             fontsize = 12,
  109.             halign = UIALIGN_LEFT,
  110.         },
  111.         
  112.  
  113. -- ------------------------- Bottom Buttons -------------------------
  114.         
  115.         StartOver =
  116.         {
  117.             text = "Configure Options",
  118.             skin = UI.skins.ActionButton,
  119.             fontname = "UI_Control",
  120.             
  121.             left = 250, top = 544,
  122.             width = 160, height = 32,
  123.     
  124.             tabstop = 1,
  125.             
  126.             OnCommand = function(self)
  127.                 TechDemo:GoToScreen( ".." );
  128.                 TechDemo:GoToScreen( ".." );
  129.             end,
  130.         },
  131.         
  132.         AnotherTry =
  133.         {
  134.             text = "Run Benchmark",
  135.             skin = UI.skins.ActionButton,
  136.             fontname = "UI_Control",
  137.             
  138.             left = 425, top = 544,
  139.             width = 160, height = 32,
  140.     
  141.             tabstop = 1,
  142.             
  143.             OnCommand = function(self)
  144.                 TechDemo:GoToScreen( ".." );
  145.             end,
  146.         },
  147.         
  148.         Quit =
  149.         {
  150.             text = "Quit",
  151.             skin = UI.skins.ActionButton,
  152.             fontname = "UI_Control",
  153.             
  154.             left = 600, top = 544,
  155.             width = 160, height = 32,
  156.     
  157.             tabstop = 1,
  158.             
  159.             OnCommand = function(self)
  160.                 TechDemo:Quit();
  161.             end,
  162.         },
  163.         
  164.         OnInit = function(self)
  165.             --szResults = TechDemo:GetBenchmarkResults();
  166.             --UI.PageBenchmarkResults.GUI.Result_Title.text = szResults;
  167.         end,    
  168.                     
  169.         OnActivate= function(self) -- this will be called everytime you activate this screen
  170.                     
  171.             local szResults = TechDemo:GetBenchmarkResults();
  172.             UI.PageBenchmarkResults.GUI.FPS_Label:SetText( szResults.." frames per second" );
  173.             
  174.             UI.PageBenchmarkResults.GUI.Config_Res_Label:SetText( tostring(r_Width).."x"..tostring(r_Height).." with "..tostring(r_ColorBits).."bit color" );
  175.             UI.PageBenchmarkResults.GUI.Config_FSAA_Label:SetText( tostring(r_FSAA).."x FSAA" );
  176.             
  177.             --UI.PageBenchmarkResults.GUI.Time_Label:SetText( "Time Elapsed: "..tostring(Benchmark_TotalMinutes).."min "..tostring(Benchmark_TotalSeconds).."sec" );
  178.  
  179.         end,
  180.     },
  181. };
  182.  
  183. szScreen = "BenchmarkResults";
  184. UI:CreateScreenFromTable(szScreen, UI.PageBenchmarkResults.GUI);
  185. Script:LoadScript("Scripts/UIScreens/UISystem.lua", 1);
  186.