public static void OnFinalize() { ScreenManager.DeactivateAndFinalizeAllScreens(); ScreenManager._screenList = (List <ScreenBase>)null; ScreenManager._globalLayers = (List <GlobalLayer>)null; ScreenManager._focusedLayer = (ScreenLayer)null; }
public static void CleanAndPushScreen(ScreenBase screen) { Debug.Print(nameof(CleanAndPushScreen)); ScreenManager.DeactivateAndFinalizeAllScreens(); ScreenManager._screenList.Add(screen); screen.HandleInitialize(); screen.HandleActivate(); screen.HandleResume(); ScreenManager.RefreshGlobalOrder(); ScreenManager.OnPushScreenEvent onPushScreen = ScreenManager.OnPushScreen; if (onPushScreen == null) { return; } onPushScreen(screen); }