void stoneFrictionMenuEntry_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.StoneFriction += 0.025f;
     stoneFrictionMenuEntry.Text = "Stone Friction : " + GameSettings.StoneFriction;
 }
        //beta
        void resetSaveMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Beta Test Feature:  Reset save data?";

            MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message);

            confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmExitMessageBox, playerIndex);
        }
 void ShotPath_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.ShotColorIndex += 1;
     if (GameSettings.ShotColorIndex >= GameSettings.Colors.Count()) GameSettings.ShotColorIndex = 0;
     GameSettings.ShotPathColor = GameSettings.Colors[GameSettings.ShotColorIndex];
     SetMenuEntryText();
 }
 void HelpGraphic_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.HelpGraphicIndex +=1;
     if (GameSettings.HelpGraphicIndex > 6) GameSettings.HelpGraphicIndex = 0;
     SetMenuEntryText();
 }
 //beta
 void locksMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.LocksOn = !GameSettings.LocksOn;
     locksMenuEntry.Text = "Level/Fruit Locks (Beta Testing): " + (GameSettings.LocksOn ? " On" : " Off");
 }
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to quit" message box. This uses the loading screen to
 /// transition from the game back to the main menu screen.
 /// </summary>
 void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                                                    new MainMenuScreen());
 }
        //beta for reset save
        void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
        {
            for (int i = 0; i < 7; i++)
            {
                for (int j = 1; j < 16; j++)
                {
                    LevelDataManager.levelData[i, j].unlocked = false;
                    LevelDataManager.levelData[i, j].starCollected = false;
                    LevelDataManager.levelData[i, j].shots = 0;
                    LevelDataManager.levelData[i, j].bestScore = 0;
                }
            }

            LevelDataManager.LockSetup();
            LevelDataManager.WriteSaveGameData();
        }
 void woodHPMultiplierMenuEntry_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodHPMultiplier -= 1;
     if (GameSettings.WoodHPMultiplier <= 0) GameSettings.WoodHPMultiplier = 1;
     woodHPMultiplierMenuEntry.Text = "Wood HP Multiplier : " + GameSettings.WoodHPMultiplier;
 }
 void woodHPMultiplierMenuEntry_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodHPMultiplier += 1;
     woodHPMultiplierMenuEntry.Text = "Wood HP Multiplier : " + GameSettings.WoodHPMultiplier;
 }
 void woodDensityMenuEntry_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodDensity += 0.025f;
     woodDensityMenuEntry.Text = "Wood Density : " + GameSettings.WoodDensity;
 }
 void woodFrictionMenuEntry_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodFriction += 0.025f;
     woodFrictionMenuEntry.Text = "Wood Friction : " + GameSettings.WoodFriction;
 }
 void woodDensityMenuEntry_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodDensity -= 0.025f;
     if (GameSettings.WoodDensity <= 0) GameSettings.WoodDensity = 0.025f;
     woodDensityMenuEntry.Text = "Wood Density : " + GameSettings.WoodDensity;
 }
 void stoneHPMultiplierMenuEntry_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.StoneHPMultiplier += 1;
     stoneHPMultiplierMenuEntry.Text = "Stone HP Multiplier : " + GameSettings.StoneHPMultiplier;
 }
 void stoneHPMultiplierMenuEntry_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.StoneHPMultiplier -= 1;
     if (GameSettings.StoneHPMultiplier <= 0) GameSettings.StoneHPMultiplier = 1;
     stoneHPMultiplierMenuEntry.Text = "Stone HP Multiplier : " + GameSettings.StoneHPMultiplier;
 }
 void ShowControlsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.ShowControlsEnabled = !GameSettings.ShowControlsEnabled;
     showControlsMenuEntry.Text = ("Show Controls :" + (GameSettings.ShowControlsEnabled ? " On" : " Off"));
 }
 void woodRestitutionMenuEntry_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodRestitution -= 0.025f;
     if (GameSettings.WoodRestitution <= 0) GameSettings.WoodRestitution = 0.025f;
     woodRestitutionMenuEntry.Text = "Wood Restitution : " + GameSettings.WoodRestitution;
 }
 void BlockDeathSelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.BlockDeathEnabled = !GameSettings.BlockDeathEnabled;
     blockDeath.Text = ("Enable Destructable Blocks :" + (GameSettings.BlockDeathEnabled ? " On" : " Off"));
 }
 void woodRestitutionMenuEntry_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.WoodRestitution += 0.025f;
     if (GameSettings.WoodRestitution >= 1) GameSettings.WoodRestitution = 0.975f;
     woodRestitutionMenuEntry.Text = "Wood Restitution : " + GameSettings.WoodRestitution;
 }
        void LevelMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            //enforce level Lock
            if (!LevelDataManager.levelData[LevelDataManager.nextworld, LevelDataManager.nextlevel].unlocked && GameSettings.LocksOn) return;

            //boss lock
            //if (LevelDataManager.nextworld == 5 && LevelDataManager.nextlevel == 15) return;

            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen(LevelDataManager.nextworld, LevelDataManager.nextlevel));
        }
 void DebugViewSelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.DebugViewEnabled = !GameSettings.DebugViewEnabled;
     debugView.Text  = ("Debug View :" + (GameSettings.DebugViewEnabled ? " On" : " Off"));
 }
 void HelpGraphic_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.HelpGraphicIndex -= 1;
     if (GameSettings.HelpGraphicIndex < 0) GameSettings.HelpGraphicIndex = 6;
     SetMenuEntryText();
 }
 void MultiSampleSelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.MultiSampling = !GameSettings.MultiSampling;
     multiSample.Text = ("Graphics SuperSampling :" + (GameSettings.MultiSampling ? " On" : " Off"));
 }
        void HelpGraphic_Selected(object sender, PlayerIndexEventArgs e)
        {
            switch (GameSettings.HelpGraphicIndex)
            {
                case 0:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutApple", out help);
                        break;
                    }
                case 1:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutOrange", out help);
                        break;
                    }
                case 2:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutStraw", out help);
                        break;
                    }
                case 3:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutCherries", out help);
                        break;
                    }
                case 4:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutBanana", out help);
                        break;
                    }
                case 5:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutLemon", out help);
                        break;
                    }
                case 6:
                    {
                        LevelDataManager.UItextures.TryGetValue("TutWater", out help);
                        break;
                    }
                default:
                    {
                        help = controls;
                        break;
                    }
            }

            ScreenManager.AddScreen(new PopUpGraphicScreen(help,Vector2.Zero,PopUpGraphicScreen.TransitionType.Fade, TimeSpan.FromSeconds(0.5)),ControllingPlayer);
        }
 void MusicOnSelected(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.MusicOn = !GameSettings.MusicOn;
     musicOn.Text = ("Music :" + (GameSettings.MusicOn ? " On" : " Off"));
     SoundManager.PauseMusic(GameSettings.MusicOn);
 }
 void Music_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.MusicVolume += 5;
     SetMenuEntryText();
 }
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Are you sure you want to quit this game?";

            MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
 void ShotPath_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.ShotColorIndex -= 1;
     if (GameSettings.ShotColorIndex < 0) GameSettings.ShotColorIndex = GameSettings.Colors.Count() - 1;
     GameSettings.ShotPathColor = GameSettings.Colors[GameSettings.ShotColorIndex];
     SetMenuEntryText();
 }
 void RestartGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new GameplayScreen(LevelDataManager.world, LevelDataManager.level));
 }
 void Sound_Plus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.EffectVolume += 5;
     SetMenuEntryText();
 }
 void stoneFrictionMenuEntry_Minus(object sender, PlayerIndexEventArgs e)
 {
     GameSettings.StoneFriction -= 0.025f;
     if (GameSettings.StoneFriction <= 0) GameSettings.StoneFriction = 0.025f;
     stoneFrictionMenuEntry.Text = "Stone Friction : " + GameSettings.StoneFriction;
 }