public void SetTitle(int selectedTabIndex)
 {
     UpdateCodexButton();
     if ((UnityEngine.Object)TabTitle != (UnityEngine.Object)null)
     {
         TabTitle.SetTitle(target.GetProperName());
         MinionIdentity minionIdentity = null;
         StorageLocker  x = null;
         if ((UnityEngine.Object)target != (UnityEngine.Object)null)
         {
             minionIdentity = target.gameObject.GetComponent <MinionIdentity>();
             x = target.gameObject.GetComponent <StorageLocker>();
         }
         if ((UnityEngine.Object)minionIdentity != (UnityEngine.Object)null)
         {
             TabTitle.SetSubText(minionIdentity.GetComponent <MinionResume>().GetSkillsSubtitle(), string.Empty);
             TabTitle.SetUserEditable(true);
         }
         else if ((UnityEngine.Object)x != (UnityEngine.Object)null)
         {
             TabTitle.SetSubText(string.Empty, string.Empty);
             TabTitle.SetUserEditable(true);
         }
         else
         {
             TabTitle.SetSubText(string.Empty, string.Empty);
             TabTitle.SetUserEditable(false);
         }
     }
 }
Пример #2
0
 private static void Postfix(DetailsScreen __instance, EditableTitleBar ___TabTitle)
 {
     if (___TabTitle != null)
     {
         var alarm = __instance.target.GetComponent <Alarm>();
         if (alarm != null)
         {
             ___TabTitle.SetUserEditable(editable: true);
         }
     }
 }
            public static void Postfix(DetailsScreen __instance, EditableTitleBar ___TabTitle)
            {
                var target = __instance.target;
                var notificationTrigger = target.gameObject.GetComponent <NotificationTrigger>();

                if (notificationTrigger == null)
                {
                    return;
                }

                ___TabTitle.SetUserEditable(true);
                ___TabTitle.SetSubText(string.Empty);

                if (UI.StripLinkFormatting(target.GetProperName()) != NotificationTriggerConfig.DisplayName)
                {
                    ___TabTitle.SetSubText(NotificationTriggerConfig.DisplayName);
                }
            }
Пример #4
0
        static void Postfix(int selectedTabIndex, DetailsScreen __instance, EditableTitleBar ___TabTitle)
        {
            GameObject target = __instance.target;
            KPrefabID  prefab = target?.GetComponent <KPrefabID>();

            if (prefab != null && prefab.HasTag(GameTags.Creature))
            {
                ___TabTitle.SetUserEditable(true);

                string properName = UI.StripLinkFormatting(target.GetProperName());

                ___TabTitle.SetTitle(properName);
                ___TabTitle.SetSubText("");

                string originalProperName = TagManager.GetProperName(prefab.PrefabTag, stripLink: true);
                if (properName != originalProperName)
                {
                    ___TabTitle.SetSubText(originalProperName);
                }
            }
        }