private void DoShow(WindowHistoryEntry windowEntry) { if (CurrentWindow == windowEntry.Screen) { Debug.LogWarning( string.Format( "[WindowUILayer] The requested WindowId ({0}) is already open! This will add a duplicate to the " + "history and might cause inconsistent behaviour. It is recommended that if you need to open the same" + "screen multiple times (eg: when implementing a warning message pop-up), it closes itself upon the player input" + "that triggers the continuation of the flow." , CurrentWindow.ScreenId)); } else if (CurrentWindow != null && CurrentWindow.HideOnForegroundLost && !windowEntry.Screen.IsPopup) { CurrentWindow.Hide(); } windowHistory.Push(windowEntry); AddTransition(windowEntry.Screen); if (windowEntry.Screen.IsPopup) { priorityParaLayer.DarkenBG(); } windowEntry.Show(); CurrentWindow = windowEntry.Screen; }
private void ShowNextInQueue() { if (windowQueue.Count > 0) { WindowHistoryEntry window = windowQueue.Dequeue(); DoShow(window); } }
private void ShowPreviousInHistory() { if (windowHistory.Count > 0) { WindowHistoryEntry window = windowHistory.Pop(); DoShow(window); } }