// Toggle whether items are on or off
 private void ItemsSelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.ItemsOn = !GameSettings.ItemsOn;
     setItemsText();
 }
 private void ArenaRightSelected(object sender, PlayerIndexEventArgs e)
 {
     arenaIndex++;
     if (arenaIndex >= arenas.Count)
     {
         arenaIndex = 0;
     }
     GameSettings.Arena = arenas[arenaIndex];
     setArenaText();
 }
 private void FightSelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, null, new BattleScreen(GameSettings.NumLives, GameSettings.NumPlayers, GameSettings.ItemsOn));
 }
 private void RumbleSelect(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.Rumble = !GameSettings.Rumble;
     setRumbleText();
 }
 private void ArenaLeftSelected(object sender, PlayerIndexEventArgs e)
 {
     arenaIndex--;
     if (arenaIndex < 0)
     {
         arenaIndex = arenas.Count - 1;
     }
     GameSettings.Arena = arenas[arenaIndex];
     setArenaText();
 }
 private void NumPlayersLeftSelected(object sender, PlayerIndexEventArgs e)
 {
     if (GameSettings.NumPlayers > 2)
     {
         GameSettings.NumPlayers--;
         setNumPlayersText();
     }
 }
 /// <summary>
 /// Handler goes to the options screen.
 /// </summary>
 protected void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new OptionsScreen(), null);
 }
 // Increase music volume
 private void MusicVolumeIncrease(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.MusicVolume += 1;
     if (GameSettings.MusicVolume > 10)
     {
         GameSettings.MusicVolume = 10;
     }
     setMusicVolumeText();
 }
        // Modify screen resolution as specified by settings.
        private void OnComplete(object sender, PlayerIndexEventArgs e)
        {
            // Set full screen, if necessary
            if (GameSettings.Windowed == ScreenManager.GraphicsDeviceManager.IsFullScreen)
            {
                ScreenManager.GraphicsDeviceManager.ToggleFullScreen();
            }

            // Resize window, if necessary
            if (GameSettings.WindowWidth != ScreenManager.GraphicsDevice.Viewport.Width ||
                GameSettings.WindowHeight != ScreenManager.GraphicsDevice.Viewport.Height)
            {
                ScreenManager.GraphicsDeviceManager.PreferredBackBufferWidth = GameSettings.WindowWidth;
                ScreenManager.GraphicsDeviceManager.PreferredBackBufferHeight = GameSettings.WindowHeight;
                ScreenManager.GraphicsDeviceManager.ApplyChanges();
            }
        }
 // Toggle fullscreen
 private void FullscreenMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.Windowed = !GameSettings.Windowed;
     setWindowedEntryText();
 }
 // Decrease music volume
 private void MusicVolumeDecrease(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.MusicVolume -= 1;
     if (GameSettings.MusicVolume < 0)
     {
         GameSettings.MusicVolume = 0;
     }
     setMusicVolumeText();
 }
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     OnCancel(e.PlayerIndex);
 }
 /// <summary>
 /// Handler quits the game.
 /// </summary>
 protected void QuitMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.Game.Exit();
 }
 /// <summary>
 /// Handler goes to start a game.
 /// </summary>
 protected void PlayGameMenuSelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new PreGameSettingsScreen(), null);
        // LoadingScreen.Load(ScreenManager, e.PlayerIndex, new BackgroundScreen(), new PreGameSettingsScreen());
 }
 private void NumLivesLeftSelected(object sender, PlayerIndexEventArgs e)
 {
     if (GameSettings.NumLives > MIN_LIVES)
     {
         GameSettings.NumLives--;
         setNumLivesText();
     }
 }
 private void PunchJumpSelect(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.PunchJumpMode = !GameSettings.PunchJumpMode;
     setPunchJumpText();
 }
 private void NumLivesRightSelected(object sender, PlayerIndexEventArgs e)
 {
     if (GameSettings.NumLives < MAX_LIVES)
     {
         GameSettings.NumLives++;
         setNumLivesText();
     }
 }
        // Change Resolution - Better Resolution
        private void ResolutionRightSelected(object sender, PlayerIndexEventArgs e)
        {
            initializeScreenSizes();

            // Get the next display mode.
            displayModeIndex++;
            if (displayModeIndex >= displayModes.Count)
            {
                displayModeIndex = 0;
            }

            // Update the settings
            DisplayMode newDisplayMode = displayModes[displayModeIndex];
            GameSettings.WindowWidth = newDisplayMode.Width;
            GameSettings.WindowHeight = newDisplayMode.Height;

            setResolutionEntryText();
        }
 private void NumPlayersRightSelected(object sender, PlayerIndexEventArgs e)
 {
     if (GameSettings.NumPlayers < 4)
     {
         GameSettings.NumPlayers++;
         setNumPlayersText();
     }
 }
 /// <summary>
 /// Quit when selected
 /// </summary>
 protected void QuitMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, e.PlayerIndex, new MainMenuBackgroundScreen(), new MainMenuScreen());
 }