/// <summary>
        /// Remove window from stack.
        /// </summary>
        private void RemoveWindow()
        {
            UserInterfaceWindow oldWindow = TopWindow;

            if (oldWindow != null && !(TopWindow is UserInterfaceWindows.DaggerfallHUD))
            {
                windows.Pop();
                oldWindow.OnPop();
                if (TopWindow != null)
                {
                    TopWindow.OnReturn();
                }
            }

            if (DaggerfallUI.Instance.enableHUD)
            {
                if (windows.Count <= 1 && GameManager.HasInstance)
                {
                    GameManager.Instance.PauseGame(false);
                    GameManager.Instance.PlayerActivate.SetClickDelay();
                }
            }
            else
            {
                if (windows.Count < 1 && GameManager.HasInstance)
                {
                    GameManager.Instance.PauseGame(false);
                    GameManager.Instance.PlayerActivate.SetClickDelay();
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Remove window from stack.
        /// </summary>
        private void RemoveWindow()
        {
            UserInterfaceWindow oldWindow = TopWindow;

            if (oldWindow != null)
            {
                //OnWindowChange -= oldWindow.WindowChanged;
                oldWindow.OnPop();
                windows.Pop();
            }
            if (windows.Count <= 1)
            {
                GameManager.Instance.PauseGame(false);
            }
        }
        /// <summary>
        /// Remove window from stack.
        /// </summary>
        private void RemoveWindow()
        {
            UserInterfaceWindow oldWindow = TopWindow;

            if (oldWindow != null)
            {
                oldWindow.OnPop();
                windows.Pop();
                if (TopWindow != null)
                {
                    TopWindow.OnReturn();
                }
            }
            if (windows.Count <= 1 && GameManager.HasInstance)
            {
                GameManager.Instance.PauseGame(false);
            }
        }