public static void Load(ScreenManager screenManager, bool loadingIsSlow, PlayerIndex? controllingPlayer,params GameScreen[] screensToLoad) { foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); LoadingScreen loadingScreen = new LoadingScreen(screenManager, loadingIsSlow, screensToLoad); screenManager.AddScreen(loadingScreen, controllingPlayer); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to quit" message box. This uses the loading screen to /// transition from the game back to the main menu screen. /// </summary> void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); }
void returnToMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); }