private void DrawItem(Rect r, string guid) { FR2_Ref rf; if (!refs.TryGetValue(guid, out rf)) { return; } if (rf.depth == 1) //mode != Mode.Dependency && { Color c = GUI.color; GUI.color = Color.blue; GUI.DrawTexture(new Rect(r.x - 4f, r.y + 2f, 2f, 2f), EditorGUIUtility.whiteTexture); GUI.color = c; } rf.asset.Draw(r, false, FR2_Setting.GroupMode != FR2_RefDrawer.Mode.Folder, null); Rect drawR = r; drawR.x = drawR.x + drawR.width - 50f; // (groupDrawer.TreeNoScroll() ? 60f : 70f) ; drawR.width = 30; drawR.y += 1; drawR.height -= 2; if (GUI.Button(drawR, "X", EditorStyles.miniButton)) { FR2_Setting.RemoveIgnore(rf.asset.assetPath); } }
//[MenuItem("Assets/FR2/Toggle Ignore", false, 19)] private static void Ignore() { Object[] actives = Selection.objects; for (var i = 0; i < actives.Length; i++) { string path = AssetDatabase.GetAssetPath(actives[i]); if (path.Equals(FR2_Cache.DEFAULT_CACHE_PATH)) { continue; } if (FR2_Setting.IgnoreAsset.Contains(path)) { FR2_Setting.RemoveIgnore(path); } else { FR2_Setting.AddIgnore(path); } } }
private void DrawGroup(Rect r, string id, int childCound) { GUI.Label(r, id, EditorStyles.boldLabel); if (childCound <= 1) { return; } Rect drawR = r; drawR.x = drawR.x + drawR.width - 50f; // (groupDrawer.TreeNoScroll() ? 60f : 70f) ; drawR.width = 30; drawR.y += 1; drawR.height -= 2; if (GUI.Button(drawR, "*X", EditorStyles.miniButton)) { List <FR2_Ref> lst = refs.Values.Where(x => x.group == id).ToList(); for (var i = 0; i < lst.Count; i++) { FR2_Setting.RemoveIgnore(lst[i].asset.assetPath); } } }