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");
 }
 public static bool DoSpecialFilter(SpecialThingFilterDef sfDef)
 {
     if (!InDoThingFilterConfigWindow || !sfDef.configurable || InViewArea)
     {
         return(true);
     }
     ThingFilterOptimizerMod.DbgLog("SKIP");
     l.EndLine();
     return(false);
 }
 public static bool DoThingDef()
 {
     if (!InDoThingFilterConfigWindow || InViewArea)
     {
         return(true);
     }
     ThingFilterOptimizerMod.DbgLog("SKIP");
     l.EndLine();
     return(false);
 }
 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);
 }
        public static bool VisibleDbg(Listing_TreeThingFilter __instance)
        {
            if (!InDoThingFilterConfigWindow)
            {
                return(true);
            }

            bool result = !IsOutOfHeight;

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

            return(result);
        }
 public static void DoThingFilterConfigWindow_Postfix()
 {
     InDoThingFilterConfigWindow     = false;
     Listing_TreeThingFilter_Patch.l = null;
     ThingFilterOptimizerMod.DbgLog("END");
 }