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

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

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

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

            btnNewGame = new GuiButton(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 4), 336, 69, 0, Color.Black * 0.3f, Color.YellowGreen * 0.3f, Color.White, Color.White * 0.6f, "New Game", @"Fonts\StartMenuButtonFont");
            btnContinue = new GuiButton(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 4 + 69), 336, 69, 0, Color.Black * 0.15f, Color.YellowGreen * 0.15f, Color.White, Color.White * 0.6f, "Continue", @"Fonts\StartMenuButtonFont");
            btnOptions = new GuiButton(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 4 + 138), 336, 69, 0, Color.Black * 0.3f, Color.YellowGreen * 0.3f, Color.White, Color.White * 0.6f, "Options", @"Fonts\StartMenuButtonFont");
            btnExit = new GuiButton(new Vector2(Game1.ViewPortWidth / 2 - 168, Game1.ViewPortHeight / 4 + 207), 336, 69, 0, Color.Black * 0.15f, Color.YellowGreen * 0.15f, Color.White, Color.White * 0.6f, "Exit", @"Fonts\StartMenuButtonFont");

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

            guiSystem.LoadContent(Content, graphicsDevice);
            guiSystem.ButtonIndexUpdate(0);
        }
        public void LoadContent(ContentManager Content, GraphicsDevice graphicsDevice)
        {
            btnControlUp = new GuiButton(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 GuiButton(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);
        }
Beispiel #3
0
 public void Add(GuiButton guiButton)
 {
     GuiButtonList.Add(guiButton);
 }
Beispiel #4
0
 public void Add(GuiButton guiButton)
 {
     GuiButtonList.Add(guiButton);
 }