public PauseMenu(Game game) : base(game) { selectedTextCount = 0; buttonPressed = false; startButtonPressed = true; normalText = Game.Content.Load<SpriteFont>(@"Fonts/NormalText"); selectedText = Game.Content.Load<SpriteFont>(@"Fonts/SelectedText"); titleText = Game.Content.Load<SpriteFont>(@"Fonts/TitleText"); backDrop = Game.Content.Load<Texture2D>(@"Textures/BackDrop"); spriteBatch = new SpriteBatch(Game.GraphicsDevice); optionsMenu = new OptionsMenu(game, @"Textures/BackDrop"); menuList = new SelectText[] {new SelectText("RESUME", spriteBatch, new Vector2((Game.Window.ClientBounds.Width/2) - (titleText.MeasureString("RESUME").Length()/2), 100), normalText, selectedText), new SelectText("OPTIONS", spriteBatch, new Vector2((Game.Window.ClientBounds.Width/2) - (titleText.MeasureString("OPTIONS").Length()/2), 200), normalText, selectedText), new SelectText("MAIN MENU", spriteBatch, new Vector2((Game.Window.ClientBounds.Width/2) - (titleText.MeasureString("MAIN MENU").Length()/2), 300), normalText, selectedText)}; }
public MainMenu(Game game) : base(game) { selectedTextCount = 0; moveSelection = true; buttonPressed = false; normalText = Game.Content.Load<SpriteFont>(@"Fonts/NormalText"); selectedText = Game.Content.Load<SpriteFont>(@"Fonts/SelectedText"); titleText = Game.Content.Load<SpriteFont>(@"Fonts/TitleText"); nameText = Game.Content.Load<SpriteFont>(@"Fonts/NameText"); background = Game.Content.Load<Texture2D>(@"Textures/MainMenuBackground"); spriteBatch = new SpriteBatch(Game.GraphicsDevice); optionsMenu = new OptionsMenu(game, @"Textures/MainMenuBackground"); gameName = "CITY DEFENSE"; names = "Ryan Adams\nBryce Ellsworth\nDoug Fresh\nJessie Morales"; menuList = new SelectText[] {new SelectText("PLAY", spriteBatch, new Vector2((Game.Window.ClientBounds.Width/2) - (titleText.MeasureString("PLAY").Length()/2), 100), normalText, selectedText), new SelectText("OPTIONS", spriteBatch, new Vector2((Game.Window.ClientBounds.Width/2) - (titleText.MeasureString("OPTIONS").Length()/2 - titleText.MeasureString("OPTIONS").Length()/9), 200), normalText, selectedText), new SelectText("EXIT", spriteBatch, new Vector2((Game.Window.ClientBounds.Width/2) - (titleText.MeasureString("EXIT").Length()/2), 300), normalText, selectedText)}; }