public static void DrawFilterTab(ItemOptionList OptionList) { System.Action two = null; System.Action tri = null; System.Action one = null; Prefab.SectionTabButton("ФИЛЬТР ПРЕДМЕТОВ", delegate { Prefab.Toggle("Оружие", ref OptionList.ItemfilterGun, 17); Prefab.Toggle("Оружие ближнего боя", ref OptionList.ItemfilterGunMeel, 17); Prefab.Toggle("Боеприпасы", ref OptionList.ItemfilterAmmo, 17); Prefab.Toggle("Медикаменты", ref OptionList.ItemfilterMedical, 17); Prefab.Toggle("Рюкзаки", ref OptionList.ItemfilterBackpack, 17); Prefab.Toggle("Charges", ref OptionList.ItemfilterCharges, 17); Prefab.Toggle("Топливо", ref OptionList.ItemfilterFuel, 17); Prefab.Toggle("Одежда", ref OptionList.ItemfilterClothing, 17); Prefab.Toggle("Провизия", ref OptionList.ItemfilterFoodAndWater, 17); Prefab.Toggle("Настройка фильтра", ref OptionList.ItemfilterCustom, 17); bool itemfilterCustom = OptionList.ItemfilterCustom; if (itemfilterCustom) { GUILayout.Space(5f); string text = "Кастомизация фильтра"; System.Action code; if ((code = one) == null) { code = (one = delegate() { GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(55f); OptionList.searchstring = Prefab.TextField(OptionList.searchstring, "Поиск:", 200); GUILayout.Space(5f); bool flag = Prefab.Button("Обновить", 276f, 25f, new GUILayoutOption[0]); if (flag) { ItemsComponent.RefreshItems(); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); Rect area = new Rect(70f, 50f, 540f, 190f); string title = "Добавить"; ItemOptionList optionList = OptionList; System.Action code2; if ((code2 = two) == null) { code2 = (two = delegate() { GUILayout.Space(5f); for (int i = 0; i < ItemsComponent.items.Count; i++) { ItemAsset itemAsset = ItemsComponent.items[i]; bool flag2 = false; bool flag3 = itemAsset.itemName.ToLower().Contains(OptionList.searchstring.ToLower()); if (flag3) { flag2 = true; } bool flag4 = OptionList.searchstring.Length < 2; if (flag4) { flag2 = false; } bool flag5 = OptionList.AddedItems.Contains(itemAsset.id); if (flag5) { flag2 = false; } bool flag6 = flag2; if (flag6) { ItemUtilities.DrawItemButton(itemAsset, OptionList.AddedItems); } } GUILayout.Space(2f); }); } Prefab.ScrollView(area, title, ref optionList.additemscroll, code2, 20, new GUILayoutOption[0]); Rect area2 = new Rect(70f, 245f, 540f, 191f); string title2 = "Удалить"; ItemOptionList optionList2 = OptionList; System.Action code3; if ((code3 = tri) == null) { code3 = (tri = delegate() { GUILayout.Space(5f); for (int i = 0; i < ItemsComponent.items.Count; i++) { ItemAsset itemAsset = ItemsComponent.items[i]; bool flag2 = false; bool flag3 = itemAsset.itemName.ToLower().Contains(OptionList.searchstring.ToLower()); if (flag3) { flag2 = true; } bool flag4 = !OptionList.AddedItems.Contains(itemAsset.id); if (flag4) { flag2 = false; } bool flag5 = flag2; if (flag5) { ItemUtilities.DrawItemButton(itemAsset, OptionList.AddedItems); } } GUILayout.Space(2f); }); } Prefab.ScrollView(area2, title2, ref optionList2.removeitemscroll, code3, 20, new GUILayoutOption[0]); }); } Prefab.SectionTabButton(text, code, 0f, 20); } }, 0f, 20); }