/// <summary> /// The constructor is private: loading screens should /// be activated via the static Load method instead. /// </summary> private LoadingScreen( /*ScreenManager screenManager,*/ bool loadingIsSlow, Screen[] screensToLoad) { this.loadingIsSlow = loadingIsSlow; this.screensToLoad = screensToLoad; TransitionOnTime = TimeSpan.FromSeconds(1.5); }
public static void Pop(Screen name) { if (isInitialized) name.UnloadContent(); Stack.Remove(name); screensToUpdate.Remove(name); }
public static void Switch(Screen name) { if (Stack.Count > 0) { Pop(name); Push(name); } }
public static void Push(Screen name) { //name.ScreenManager = this; name.IsExiting = false; if (isInitialized) name.LoadContent(); Stack.Add(name); }