// Event handler for when the Quit Game menu entry is selected.
 void QuitGameSelected(object sender, PlayerIndexEventArgs e)
 {
     MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(promptMessage, acceptMessage);
     confirmQuitMessageBox.Accepted += ConfirmQuitAccepted;
     ScreenManager.AddScreen(confirmQuitMessageBox);
 }
示例#2
0
 protected override void OnCancel()
 {
     MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(exitPrompt, acceptPrompt);
     confirmExitMessageBox.Accepted += ConfirmExitSelected;
     ScreenManager.AddScreen(confirmExitMessageBox);
 }