예제 #1
0
    void showOneFile(ECLResInfor ri, bool canEdite, bool needFilter)
    {
        if (needFilter && searchKey != "")
        {
            if (!ri.path.ToLower().Contains(searchKey.ToLower()))
            {
                return;
            }
        }

        string fname = ri.relativePath;

        EditorGUILayout.BeginHorizontal();
        {
            if (canEdite)
            {
                bool selected = GUILayout.Toggle(ri.selected, "", GUILayout.Width(20));
                if (selected != ri.selected)
                {
                    ri.selected = selected;
                    if (ri.isDir)
                    {
                        ArrayList list = new ArrayList();
                        list.AddRange(datas);
                        int         count = list.Count;
                        ECLResInfor res   = null;
                        for (int i = 0; i < count; i++)
                        {
                            res = (ECLResInfor)(list [i]);
                            if (res.path.Contains(ri.path))
                            {
                                res.selected = selected;
                            }
                        }
                    }
                }
            }
            //			EditorGUILayout.LabelField ("", GUILayout.Width (ri.tabs * 4));
//		EditorGUILayout.SelectableLabel (StrEx.appendSpce ("v." + ri.ver, 6) + fname, GUILayout.Height (18));
            EditorGUILayout.SelectableLabel(StrEx.appendSpce("", 6) + fname, GUILayout.Height(18));
        }
        EditorGUILayout.EndHorizontal();
    }