public void SetSelectedFilter(ListFilterDef def) { sel = ListFilterMaker.MakeFilter(def, owner); sel.topLevel = false; }
public static ListFilter NameFilter(FindDescription owner) => ListFilterMaker.MakeFilter(ListFilterMaker.Filter_Name, owner);
public static void AddFilterFloat(FindDescription owner, List <ListFilter> filters = null) { List <FloatMenuOption> options = new List <FloatMenuOption>(); foreach (ListFilterDef def in DefDatabase <ListFilterDef> .AllDefs.Where(d => d.parent == null && (Prefs.DevMode || !d.devOnly))) { options.Add(new FloatMenuOption(def.LabelCap, () => (filters ?? owner.filters).Add(ListFilterMaker.MakeFilter(def, owner)))); } DoFloatMenu(options); }