Ejemplo n.º 1
0
        // Loading the content and setting up said content
        public void LoadContent(ContentManager Content, GraphicsDevice graphicsDevice)
        {
            backgroundManager.LoadContent(Content, graphicsDevice, @"Backgrounds\Clouds\Cloud-Plasma-1", @"Backgrounds\Clouds\Cloud-Plasma-2");

            HeaderFont = Content.Load <SpriteFont>(@"Fonts\StartMenuHeaderFont");
            HUDFont    = Content.Load <SpriteFont>(@"Fonts\HUDFont");

            HeaderPosition = new Vector2(Game1.ViewPortWidth / 2 - (HeaderFont.MeasureString(MenuTitle).X / 2), Game1.ViewPortHeight / 20);
            MadeByPosition = new Vector2(10, Game1.ViewPortHeight - HUDFont.MeasureString("Made by Nathan Todd").Y);

            boxHeaderLine = new Box(new Vector2(Game1.ViewPortWidth / 2 - (float)((
                                                                                      HeaderFont.MeasureString(MenuTitle).X * 1.3) / 2), Game1.ViewPortHeight / 6),
                                    (int)(HeaderFont.MeasureString(MenuTitle).X * 1.3), 2, 0, Color.White * 0.4f, Color.White, graphicsDevice);

            btnNewGame = new Button(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 3), 336, 69, 0, Color.Black * 0.3f, Color.YellowGreen * 0.3f,
                                    Color.White, Color.White * 0.6f, "New Game", @"Fonts\StartMenuButtonFont");

            btnOptions = new Button(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 3 + 69), 336, 69, 0, Color.Black * 0.15f, Color.YellowGreen * 0.15f,
                                    Color.White, Color.White * 0.6f, "Options", @"Fonts\StartMenuButtonFont");

            btnExit = new Button(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 3 + 138), 336, 69, 0, Color.Black * 0.3f, Color.YellowGreen * 0.3f,
                                 Color.White, Color.White * 0.6f, "Exit", @"Fonts\StartMenuButtonFont");

            guiSystem.Add(boxHeaderLine);
            guiSystem.Add(btnNewGame);
            guiSystem.Add(btnOptions);
            guiSystem.Add(btnExit);

            guiSystem.LoadContent(Content, graphicsDevice);
            guiSystem.ButtonIndexUpdate(0);
        }
Ejemplo n.º 2
0
        public void LoadContent(ContentManager Content, GraphicsDevice graphicsDevice)
        {
            btnControlUp = new Button(new Vector2(graphicsDevice.Viewport.Width / 2 - 25, 10), 50, 50, 0, Color.Black * 0.3f, Color.YellowGreen * 0.3f, Color.White, Color.White * 0.6f, Game1.MoveUpKey.ToString(), @"Fonts\StartMenuButtonFont");
            btnReturn    = new Button(new Vector2(graphicsDevice.Viewport.Width / 2 - 168, graphicsDevice.Viewport.Height / 2 + 69), 336, 69, 0, Color.Black * 0.3f, Color.YellowGreen * 0.3f, Color.White, Color.White * 0.6f, "Return", @"Fonts\StartMenuButtonFont");

            guiSystem.Add(btnControlUp);
            guiSystem.Add(btnReturn);
            guiSystem.LoadContent(Content, graphicsDevice);
            guiSystem.ButtonIndexUpdate(0);
        }
Ejemplo n.º 3
0
 public void LoadContent(ContentManager Content, GraphicsDevice graphicsDevice)
 {
     BtnTest = new Button(new Vector2(10, 10), 100, 40, 0, Color.Black * 0.15f, Color.YellowGreen * 0.15f, Color.White, Color.White, "Testing...", @"Fonts\StartMenuButtonFont");
     ChallengeSelectionList.Add(BtnTest);
     guiSystem.Add(ChallengeSelectionList);
     guiSystem.LoadContent(Content, graphicsDevice);
 }
Ejemplo n.º 4
0
 public void LoadContent(ContentManager Content, GraphicsDevice graphicsDevice)
 {
     backgroundManager.LoadContent(Content, graphicsDevice, @"Backgrounds\Clouds\Cloud-Plasma-5", @"Backgrounds\Clouds\Cloud-Plasma-6");
     btnBack = new Button(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight - 89), 336, 69, 0, Color.Black * 0.15f, Color.YellowGreen * 0.15f,
                          Color.White, Color.White, "Continue", @"Fonts\StartMenuButtonFont");
     btnBack.IsSelected = true;
     guiSystem.Add(btnBack);
     guiSystem.LoadContent(Content, graphicsDevice);
 }
Ejemplo n.º 5
0
        public void LoadContent(ContentManager content, GraphicsDevice graphicsDevice)
        {
            txtBoxWaves  = new TextBox(new Vector2(Game1.ViewPortWidth - 147, Game1.ViewPortHeight - 39), 137, 29, 1, Color.Black * 0.39f, new Color(98, 0, 0), "Waves: " + SpawnManager.WaveCount, @"Fonts\HUDFont");
            boxLifeBars  = new Box(new Vector2(10, Game1.ViewPortHeight - 54), 162, 44, 1, Color.Black * 0.39f, new Color(98, 0, 0), graphicsDevice);
            lfbHealthBar = new LifeBar(new Vector2(28, Game1.ViewPortHeight - 45), playerRef.myShip.Health, @"Sprites\GUI\Health-Bar");
            lfbShieldBar = new LifeBar(new Vector2(28, Game1.ViewPortHeight - 29), playerRef.myShip.Shield, @"Sprites\GUI\Shield-Bar");

            guiSystem.Add(txtBoxScore);
            guiSystem.Add(txtBoxFlamoca);
            guiSystem.Add(txtBoxWaves);
            guiSystem.Add(boxLifeBars);
            guiSystem.Add(lfbHealthBar);
            guiSystem.Add(lfbShieldBar);

            guiSystem.LoadContent(content, graphicsDevice);
        }