Esempio n. 1
0
        /// <summary>
        /// When the user cancels the main menu, ask if they want to exit the sample.
        /// </summary>
        protected override void OnCancel(PlayerIndex playerIndex)
        {
            const string message = "Are you sure you want to exit?";
            MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message);

            confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmExitMessageBox, playerIndex);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 void RestartGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     const string message = "Are you sure you want to quit the current game \nto begin a new one?";
     MessageBoxScreen confirmRestartMessageBox = new MessageBoxScreen(message);
     confirmRestartMessageBox.Accepted += ConfirmRestartMessageBoxAccepted;
     ScreenManager.AddScreen(confirmRestartMessageBox, ControllingPlayer);
 }