/// <summary>
 /// Event handler for when the Back menu entry is selected.
 /// </summary>
 void BackMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     if (comingFrom == "MainMenu")
     {
         BlankTransitionScreen.Load(ScreenManager, true, e.PlayerIndex, new BackgroundScreen(), new MainMenuScreen());
     }
     else if (comingFrom == "PauseMenu")
     {
         OnCancel(e.PlayerIndex);
     }
 }
 /// <summary>
 /// Overrides the OnCancel method so that we don't get stuck
 /// in the BlankTransitionScreen.
 /// </summary>
 protected override void OnCancel(PlayerIndex playerIndex)
 {
     if (comingFrom == "MainMenu")
     {
         BlankTransitionScreen.Load(ScreenManager, false, playerIndex, new BackgroundScreen(), new MainMenuScreen());
     }
     else if (comingFrom == "PauseMenu")
     {
         PauseMenuScreen.SetMenuText();
         base.OnCancel(playerIndex);
     }
 }
Пример #3
0
        /// <summary>
        /// Overrides the OnCancel method to prevent the user from getting
        /// stuck in a blank screen.
        /// </summary>
        protected override void OnCancel(Microsoft.Xna.Framework.PlayerIndex playerIndex)
        {
            base.OnCancel(playerIndex);

            BlankTransitionScreen.Load(ScreenManager, false, playerIndex, new BackgroundScreen(), new MainMenuScreen());
        }
Пример #4
0
 /// <summary>
 /// Event handler for when the Back menu entry is selected.
 /// </summary>
 void BackMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     BlankTransitionScreen.Load(ScreenManager, false, e.PlayerIndex, new BackgroundScreen(), new MainMenuScreen());
 }
Пример #5
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     BlankTransitionScreen.Load(ScreenManager, true, e.PlayerIndex, new BackgroundScreen(), new OptionsMenuScreen(comingFrom));
 }