/// <summary> /// Event handler for when the Replay Game menu entry is selected. /// </summary> void ReplayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { const string message = "Are you sure you want to replay this game?"; MessageBoxScreen confirmReplayMenuMessageBox = new MessageBoxScreen(message); ScreenManager.AddScreen(confirmReplayMenuMessageBox, ControllingPlayer); }
/// <summary> /// Event handler for when the Replay Game menu entry is selected. /// </summary> void ReplayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { const string message = "Are you sure you want to replay this game?"; MessageBoxScreen confirmReplayMenuMessageBox = new MessageBoxScreen(message); ScreenManager.AddScreen(confirmReplayMenuMessageBox, ControllingPlayer); }
/// <summary> /// Event handler for when the Quit Game menu entry is selected. /// </summary> 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); }
/// <summary> /// Event handler for when the Quit Game menu entry is selected. /// </summary> 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); }
/// <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); }
/// <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); }