public override void LoadContent() { if (content == null) content = new ContentManager(ScreenManager.Game.Services, "Content"); backgroundTexture = content.Load<Texture2D>("images/menu/main-quit"); var yes = new ImageMenuEntry(new Rectangle(28, 255, 94, 68), new Rectangle(178, 255, 94, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); yes.PositionOriginal = new Vector2(507, 367); yes.PositionSelected = new Vector2(507, 367); yes.Selected += (e, sender) => { if (!inGame) ScreenManager.Game.Exit(); else LoadingScreen.Load(ScreenManager, false, null, new MainMenuScreen()); }; var no = new ImageMenuEntry(new Rectangle(27, 178, 79, 68), new Rectangle(177, 178, 79, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); no.PositionOriginal = new Vector2(408, 367); no.PositionSelected = new Vector2(408, 367); no.Selected += OnCancel; var back = new ImageMenuEntry(new Rectangle(23, 25, 78, 54), new Rectangle(170, 25, 78, 54), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); back.PositionOriginal = new Vector2(240, 662); back.PositionSelected = new Vector2(240, 662); back.Selected += OnCancel; MenuEntries.Add(no); MenuEntries.Add(yes); MenuEntries.Add(back); base.LoadContent(); }
public override void LoadContent() { if (content == null) content = new ContentManager(ScreenManager.Game.Services, "Content"); backgroundTexture = content.Load<Texture2D>("images/menu/main-quit"); var ok = new ImageMenuEntry(new Rectangle(29, 95, 79, 68), new Rectangle(174, 95, 79, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); ok.PositionOriginal = new Vector2(460, 350); ok.PositionSelected = new Vector2(460, 350); ok.Selected += (sender, e) => LoadingScreen.Load(ScreenManager, false, null, new MainMenuScreen()); MenuEntries.Add(ok); base.LoadContent(); }
public override void LoadContent() { if (content == null) content = new ContentManager(ScreenManager.Game.Services, "Content"); backgroundTexture = content.Load<Texture2D>("images/menu/main-quit"); var newGame = new ImageMenuEntry(new Rectangle(296, 17, 220, 68), new Rectangle(542, 17, 307, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); newGame.PositionOriginal = new Vector2(387, 292); newGame.PositionSelected = new Vector2(343, 292); var options = new ImageMenuEntry(new Rectangle(293, 93, 220, 68), new Rectangle(542, 93, 307, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); options.PositionOriginal = new Vector2(402, 360); options.PositionSelected = new Vector2(359, 360); var quit = new ImageMenuEntry(new Rectangle(293, 180, 220, 68), new Rectangle(542, 180, 307, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); quit.PositionOriginal = new Vector2(434, 433); quit.PositionSelected = new Vector2(390, 433); //newGame.Selected += (sender, e) => LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, // new GameplayScreen(GameMode.SinglePlayer)); newGame.Selected += (sender, e) => ScreenManager.AddScreen(new NewGameMenuScreen(), e.PlayerIndex); options.Selected += (sender, e) => ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex); quit.Selected += (sender, e) => ScreenManager.AddScreen(new QuitMenuScreen(), e.PlayerIndex); MenuEntries.Add(newGame); MenuEntries.Add(options); MenuEntries.Add(quit); backgroundSound = ScreenManager.AudioManager.Play3DSound("sound/menu_background", true, new StaticAudioEmitter()); base.LoadContent(); }
public override void LoadContent() { if (_content == null) _content = new ContentManager(ScreenManager.Game.Services, "Content"); _backgroundTexture = _content.Load<Texture2D>("images/menu/newgame"); var back = new ImageMenuEntry(new Rectangle(23, 25, 78, 54), new Rectangle(170, 25, 78, 54), _content.Load<Texture2D>("images/menu/polozky"), _content.Load<Texture2D>("images/menu/polozky")); back.PositionOriginal = new Vector2(240, 662); back.PositionSelected = new Vector2(240, 662); back.Selected += OnCancel; var ok = new ImageMenuEntry(new Rectangle(29, 95, 79, 68), new Rectangle(174, 95, 79, 68), _content.Load<Texture2D>("images/menu/polozky"), _content.Load<Texture2D>("images/menu/polozky")); ok.PositionOriginal = new Vector2(685, 656); ok.PositionSelected = new Vector2(685, 656); ok.Selected += OnCancel; MenuEntries.Add(back); MenuEntries.Add(ok); SelectedEntry = -1; base.LoadContent(); }
public override void LoadContent() { if (content == null) content = new ContentManager(ScreenManager.Game.Services, "Content"); backgroundTexture = content.Load<Texture2D>("images/menu/settings"); var back = new ImageMenuEntry(new Rectangle(23, 25, 78, 54), new Rectangle(170, 25, 78, 54), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); back.PositionOriginal = new Vector2(240, 662); back.PositionSelected = new Vector2(240, 662); back.Selected += OnCancel; var ok = new ImageMenuEntry(new Rectangle(29, 95, 79, 68), new Rectangle(174, 95, 79, 68), content.Load<Texture2D>("images/menu/polozky"), content.Load<Texture2D>("images/menu/polozky")); ok.PositionOriginal = new Vector2(685, 656); ok.PositionSelected = new Vector2(685, 656); ok.Selected += OnCancel; MenuEntries.Add(back); MenuEntries.Add(ok); SelectedEntry = -5; pm = ((MainGame) ScreenManager.Game).PreferenceManager; previousPm = pm; pm = (PreferenceManager) pm.Clone(); base.LoadContent(); }