void ResolutionMenuEntryIncrement(object sender, PlayerIndexEventArgs e) { if (ScreenManager.preferredHeight == 720) { ScreenManager.preferredHeight = 1080; ScreenManager.preferredWidth = 1920; GameServices.GetService<GraphicsDeviceManager>().PreferredBackBufferWidth = ScreenManager.preferredWidth; GameServices.GetService<GraphicsDeviceManager>().PreferredBackBufferHeight = ScreenManager.preferredHeight; GameServices.GetService<GraphicsDeviceManager>().ApplyChanges(); ScreenManager.initParameters(); } }
void PlayersMenuEntryDecrement(object sender, PlayerIndexEventArgs e) { if (_playersCountIndex > 0) { _playersCountIndex--; } }
void PlayersMenuEntryIncrement(object sender, PlayerIndexEventArgs e) { if (_playersCountIndex < numberOfPlayers.Length - 1) { _playersCountIndex++; } }
void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.GetScreen<OptionsMenuScreen>().ShowOptions(numberOfPlayers[_playersCountIndex]); ScreenManager.ShowScreen<OptionsMenuScreen>(); }
void CreditsMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.ShowScreen<CreditsScreen>(); }
/// <summary> /// Event handler for when the Quit Game menu entry is selected. /// </summary> void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(QuitDialog, ControllingPlayer); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to quit" message box. Go back to the main menu screen. /// </summary> void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { ScreenManager.QuitGame(); GameServices.GetService<SoundManager>().StopSong(); }
public void RankScreenAccepted(object sender, PlayerIndexEventArgs e) { soundManager.StopSong(); ScreenManager.QuitGame(); }