public StartScreen(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image) : base(game, spriteBatch) { // 0 1 2 3 string[] menuItems = { "Single Player", "Multiplayer", "Options", "Exit" }; menuComponent = new MenuComponent(game, spriteBatch, spriteFont, menuItems); Components.Add(menuComponent); this.image = image; imageRectangle = new Rectangle(0, 0, Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height); }
public AreYouSure(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image) : base(game, spriteBatch) { string[] menuItems = { "Yes", "No" }; menuComponent = new MenuComponent(game, spriteBatch, spriteFont, menuItems); Components.Add(menuComponent); this.image = image; imageRectangle = new Rectangle((Game.Window.ClientBounds.Width - this.image.Width) / 2, (Game.Window.ClientBounds.Height - this.image.Height) / 2, this.image.Width, this.image.Height); menuComponent.Position = new Vector2((imageRectangle.Width - menuComponent.Width) / 2, (imageRectangle.Bottom - menuComponent.Height - 10)); }