protected override void OnCancel(PlayerIndex playerIndex) { const string message = "Are you sure you want to exit this sample?"; var confirmExitMessageBox = new MessageBoxScreen(message); confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, playerIndex); }
private void RestartGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { const string message = "Are you sure you want to restart this game?"; var confirmRestartMessageBox = new MessageBoxScreen(message); confirmRestartMessageBox.Accepted += ConfirmRestartMessageBoxAccepted; ScreenManager.AddScreen(confirmRestartMessageBox, ControllingPlayer); }