コード例 #1
0
 public static void DoThingFilterConfigWindow_Prefix(ref Rect rect, ref Vector2 scrollPosition)
 {
     InDoThingFilterConfigWindow                  = true;
     Listing_TreeThingFilter_Patch.ViewRect       = rect;
     Listing_TreeThingFilter_Patch.ScrollPosition = scrollPosition;
     ThingFilterOptimizerMod.DbgLog("START");
 }
コード例 #2
0
 public static bool DoSpecialFilter(SpecialThingFilterDef sfDef)
 {
     if (!InDoThingFilterConfigWindow || !sfDef.configurable || InViewArea)
     {
         return(true);
     }
     ThingFilterOptimizerMod.DbgLog("SKIP");
     l.EndLine();
     return(false);
 }
コード例 #3
0
 public static bool DoThingDef()
 {
     if (!InDoThingFilterConfigWindow || InViewArea)
     {
         return(true);
     }
     ThingFilterOptimizerMod.DbgLog("SKIP");
     l.EndLine();
     return(false);
 }
コード例 #4
0
 public static bool DoCategory(TreeNode_ThingCategory node, int indentLevel, int openMask, Map map)
 {
     if (!InDoThingFilterConfigWindow || InViewArea)
     {
         return(true);
     }
     ThingFilterOptimizerMod.DbgLog("SKIP");
     l.EndLine();
     if (node.IsOpen(openMask))
     {
         l.DoCategoryChildren(node, indentLevel + 1, openMask, map);
     }
     return(false);
 }
コード例 #5
0
        public static bool VisibleDbg(Listing_TreeThingFilter __instance)
        {
            if (!InDoThingFilterConfigWindow)
            {
                return(true);
            }

            bool result = !IsOutOfHeight;

            if (!result)
            {
                ThingFilterOptimizerMod.DbgLog("SKIP OUT OF RANGE");
            }

            return(result);
        }
コード例 #6
0
 public static void DoThingFilterConfigWindow_Postfix()
 {
     InDoThingFilterConfigWindow     = false;
     Listing_TreeThingFilter_Patch.l = null;
     ThingFilterOptimizerMod.DbgLog("END");
 }