/// <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?\nA = YES\nB = NO"; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message); confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, playerIndex); }
void OnCredits(object sender, PlayerIndexEventArgs e) { const string message = "Code: Eric Weinerman, Quinlan Pfiffer, Scott Cannard" + "\nArt: Benjamin Reyes" + "\nSound: Eric Weinerman, Robert Reitmeyer"; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message); //confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, e.PlayerIndex); }
void OnControls(object sender, PlayerIndexEventArgs e) { const string message = "CONTROLS CAN NOT BE CHANGED!\n" + "A, L Mouse: Select / Return Bottle\n" + "RB, R Mouse: Next Bottle\n" + "Tab, Y: Go To Shop Screen\n" + "Start, Escape: Pause / Back\n" + "B, Enter: Skip Dialogue"; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message); //confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, e.PlayerIndex); }
void OnTutorial(object sender, PlayerIndexEventArgs e) { const string message = "Tutorial is not in Braile...sorry."; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message); //confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, e.PlayerIndex); }