コード例 #1
0
        private async Task 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.GetType().Name));
            }
            else if (CurrentWindow != null && CurrentWindow.HideOnForegroundLost && !windowEntry.Screen.IsPopup)
            {
                CurrentWindow.Hide();
            }

            windowHistory.Push(windowEntry);
            AddTransition(windowEntry.Screen);

            if (windowEntry.Screen.IsPopup)
            {
                priorityParaLayer.ShowBackgroundShadow();
            }

            await windowEntry.Show();

            CurrentWindow = windowEntry.Screen;
        }
コード例 #2
0
 private async Task ShowPreviousInHistory()
 {
     if (windowHistory.Count > 0)
     {
         WindowHistoryEntry window = windowHistory.Pop();
         await DoShow(window);
     }
 }
コード例 #3
0
 private async Task ShowNextInQueue()
 {
     if (windowQueue.Count > 0)
     {
         WindowHistoryEntry window = windowQueue.Dequeue();
         await DoShow(window);
     }
 }