示例#1
0
        public static void ChooseMenuAction(InspectTabBase tab)
        {
            bool flag = tab is ITab;

            if (flag)
            {
                InspectPaneUtility.OpenTab(tab.GetType());
            }
            else
            {
                bool flag2 = tab is WITab;
                if (flag2)
                {
                    Find.MainTabsRoot.EscapeCurrentTab(false);
                    tab.OnOpen();
                    Find.World.UI.inspectPane.OpenTabType = tab.GetType();
                }
            }
        }
示例#2
0
        public static bool Prefix(MethodBase __originalMethod, InspectTabBase tab, ref string __state)
        {
            if (!Active)
            {
                return(true);
            }

            __state = string.Empty;
            if (tab is InspectTabBase f)
            {
                __state = string.Intern($"{tab.GetType()} {tab.labelKey}");
            }
            else
            {
                __state = string.Intern($"{tab.GetType()}");
            }

            ProfileController.Start(__state, null, tab.GetType(), __originalMethod);

            return(true);
        }
示例#3
0
 private static void ToggleTab(InspectTabBase tab, IInspectPane pane)
 {
     if (InspectPaneUtility.IsOpen(tab, pane) || (tab == null && pane.OpenTabType == null))
     {
         pane.OpenTabType = null;
         SoundDefOf.TabClose.PlayOneShotOnCamera(null);
     }
     else
     {
         tab.OnOpen();
         pane.OpenTabType = tab.GetType();
         SoundDefOf.TabOpen.PlayOneShotOnCamera(null);
     }
 }
示例#4
0
 public bool IsOfTypeRimFactoryBillsTab(InspectTabBase tab)
 {
     return(_isRimfactoryLoaded && tab?.GetType() == _rimFactoryBillsTabType);
 }
示例#5
0
 private static bool IsOpen(InspectTabBase tab, IInspectPane pane)
 {
     return(tab.GetType() == pane.OpenTabType);
 }
 internal bool <> m__0(InspectTabBase t)
 {
     return(this.inspectTabType.IsAssignableFrom(t.GetType()));
 }