Esempio n. 1
0
 public void LoadContent(ICanyonShooterGame game)
 {
     font        = game.Content.Load <SpriteFont>("Arial");
     header      = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\listboxheader");
     leftside    = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\listboxleft");
     rightside   = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\listboxright");
     background  = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\listboxback");
     statusrow   = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\listboxstatus");
     buttonsback = game.Content.Load <Texture2D>("Content\\Textures\\Menu\\buttonback");
     if (scrollable)
     {
         scrollbar.LoadContent();
     }
     List.LoadContent();
     Buttons.LoadContent();
     foreach (Button i in this.List)
     {
         if (SlideBars != null)
         {
             if (SlideBars.ContainsKey(i.getButtonName()))
             {
                 SlideBars[i.getButtonName()].LoadContent();
             }
         }
     }
 }
Esempio n. 2
0
 private void DrawScoreList(GameTime gameTime, SpriteBatch loader)
 {
     if (List.Count != 0)
     {
         List.Draw(gameTime, loader);
         if (this.style == 0)
         {
             int counter = 0;
             foreach (Button i in List)
             {
                 if (i.Visiblity)
                 {
                     if (game.Highscores.GetScores(Difficulty).Count != 0)
                     {
                         loader.DrawString(font, "" + (counter + 1) + ".", calcMidLine(i.Position, 0, "" + (counter + 1) + "."), Color.Beige);
                         loader.DrawString(font, i.getButtonName(), calcMidLine(i.Position, 1, i.getButtonName()), Color.White);
                         loader.DrawString(font, game.Highscores.GetScores(Difficulty)[counter].Highscore.ToString(), calcMidLine(i.Position, 2, game.Highscores.GetScores(Difficulty)[counter].Highscore.ToString()), Color.Red);
                         counter++;
                     }
                 }
             }
         }
         else if (this.style == 1)
         {
             int counter = 0;
             foreach (Button i in List)
             {
                 if (i.Visiblity)
                 {
                     i.Draw(gameTime, loader);
                     loader.DrawString(font, i.getButtonName(), calcMidLine(i.Position, 0, i.getButtonName()), Color.White);
                     if (SlideBars.ContainsKey(i.getButtonName()))
                     {
                         SlideBars[i.getButtonName()].Draw(gameTime, loader);
                     }
                     else
                     {
                         loader.DrawString(font, "" + data[i.getButtonName()], calcMidLine(i.Position, 2, "" + data[i.getButtonName()]), Color.White);
                     }
                     counter++;
                 }
             }
         }
     }
     else
     {
         loader.DrawString(font, "No Data for this Area!", (BoxContentPosition + emergencyInfo), Color.OrangeRed);
     }
 }