Example #1
0
 /// <summary>
 /// When the user cancels the main menu, ask if they want to exit the sample.
 /// </summary>
 protected override void OnCancel()
 {
     const string message = "Return to desktop?";
     MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message);
     confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted;
     ScreenManager.AddScreen(confirmExitMessageBox);
     return;
 }
Example #2
0
 /// <summary>
 /// Event handler for when the Quit Game menu entry is selected.
 /// </summary>
 void QuitGameMenuEntrySelected(object sender, PlayerInputEventArgs e)
 {
     const string message = "Quit to main menu?";
     MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);
     confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;
     ScreenManager.AddScreen(confirmQuitMessageBox);
     return;
 }