/// <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 = "Do you want to quit this game ?"; var confirmExitMessageBox = new MessageBoxScreen(message); confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, playerIndex); }
/// <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 this sample?"; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message); confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, playerIndex); }