public void PushScreen(GUIScreen screen, bool isPopup) { if (!isPopup) { foreach (var curScreen in screenStack) { curScreen.Hide(); } } screen.Show(); screenStack.Push(screen); int i = 0; }
public void ShowScreen(GUIScreen screen, bool hideAll = false) { if (hideAll) { foreach (var curScreen in screens) { if (curScreen.GetType() != screen.GetType()) { curScreen.Hide(); } } screenStack.Clear(); } screen.Show(); }
public void PopScreen() { if (screenStack.Count == 0) { return; } GUIScreen curScreen = screenStack.Pop(); curScreen.Hide(); if (screenStack.Count > 0) { GUIScreen newScreen = screenStack.Peek(); newScreen.Show(); } }
public void PushScreen(GUIScreen screen, bool isPopup) { if (!isPopup) { foreach (var curScreen in screenStack) { Debug.Log(curScreen.gameObject); curScreen.Hide(); } } screen.Show(); screenStack.Push(screen); int i = 0; foreach (var curScreen in screenStack) { curScreen.OffsetZ = i++; } SortByLayer(); }
public void ShowScreen(ScreenType type) { HideCurrentScreen(); currentScreen = GUIScreens.First(screen => screen.type == type); currentScreen.Show(); }