public void AddScreen(ScreenBase screen, QueueScreenBehavior subType)
 {
     this.AddScreen(screen, true, subType);
     if (!UXUtils.ShouldShowHudBehindScreen(screen.AssetName))
     {
         Service.Get <UXController>().HUD.Visible = false;
     }
 }
Exemple #2
0
 public void AddScreen(ScreenBase screen)
 {
     this.AddScreen(screen, true);
     if (!UXUtils.ShouldShowHudBehindScreen(screen.AssetName))
     {
         Service.UXController.HUD.Visible = false;
     }
 }
        public void RecalculateHudVisibility()
        {
            HUD hUD = Service.Get <UXController>().HUD;

            if (!hUD.ReadyToToggleVisiblity)
            {
                return;
            }
            bool flag = true;

            for (int i = this.screens.Count - 1; i >= 0; i--)
            {
                ScreenBase screenBase = this.screens[i].Screen as ScreenBase;
                if (screenBase != null)
                {
                    if (!screenBase.IsClosing)
                    {
                        flag = UXUtils.ShouldShowHudBehindScreen(screenBase.AssetName);
                        if (!flag)
                        {
                            break;
                        }
                    }
                    else
                    {
                        flag = !UXUtils.ShouldHideHudAfterClosingScreen(screenBase.AssetName);
                        if (!flag)
                        {
                            break;
                        }
                    }
                }
            }
            if (hUD.Visible != flag)
            {
                hUD.Visible = flag;
            }
        }