public Prefs <T> DoLayout(Prefs <T> prefs)
            {
                string filter = searchFilter.ToLower();

                nothingFound = false;
                if (!searching)
                {
                    foundItemsCount = prefs.Count;
                }
                else
                {
                    showItem        = new bool[prefs.dictionary.Count];
                    foundItemsCount = 0;
                    int i = 0;
                    foreach (var value in prefs.dictionary)
                    {
                        if (value.Key.ToLower().Contains(filter))
                        {
                            showItem[i] = true;
                            foundItemsCount++;
                        }
                        i++;
                    }
                    nothingFound = foundItemsCount == 0;
                }
                if (window == null || script == null || nothingFound)
                {
                    return(prefs);
                }
                shownTypesCount++;
                changes.Clear();
                EditorGUILayout.BeginVertical(regionBg, GUILayout.MaxHeight(18));
                EditorGUILayout.BeginHorizontal();

                EditorGUI.BeginChangeCheck();
                collapse.target = GUILayout.Toggle(searching ? true : EditorLocalPrefs.GetBool(PN_collapse),
                                                   label, foldout, GUILayout.ExpandWidth(true));
                if (EditorGUI.EndChangeCheck())
                {
                    EditorLocalPrefs.SetBool(PN_collapse, collapse.target);
                }

                GUILayout.FlexibleSpace();
                GUILayout.Button("[" + foundItemsCount + "]", EditorStyles.centeredGreyMiniLabel);

                if (GUILayout.Button(new GUIContent("", !searching ? "Clear All" : "Remove Found Items"), "WinBtnCloseMac"))
                {
                    if (!searching)
                    {
                        prefs.ClearAll();
                    }
                    else
                    {
                        int i = 0;
                        foreach (var value in prefs.dictionary)
                        {
                            if (!showItem[i])
                            {
                                i++;
                                continue;
                            }
                            else
                            {
                                changes.Add(new Changes(value.Key, "", default, false, false, true, 0));