Esempio n. 1
0
 public void AddFilterNode(FilterItem item)
 {
     if (nextFilterNode == null)
     {
         nextFilterNode        = item;
         item.parentFilterNode = this;
     }
     else
     {
         nextFilterNode.AddFilterNode(item);
     }
 }
Esempio n. 2
0
        //不用反射获取原生风格的搜索框了,在多个检查器切换时,数据切换了,显示得不对,怀疑是static实现?
        //public string SearchField(string value, params GUILayoutOption[] options)
        //{
        //    MethodInfo info = typeof(EditorGUILayout).GetMethod("ToolbarSearchField", BindingFlags.NonPublic | BindingFlags.Static, null, new System.Type[] { typeof(string), typeof(GUILayoutOption[]) }, null);
        //    if (info != null)
        //    {
        //        value = (string)info.Invoke(null, new object[] { value, options });
        //    }
        //    return value;
        //}

        public void CreateFilterFromCfg(FilterItem item, PredefineFilterGroup filterGroup, int index)
        {
            FilterItemCfg cfg = null;

            if (index < filterGroup.filterCfgGroup.Length)
            {
                cfg = filterGroup.filterCfgGroup[index];
            }
            else
            {
                return;
            }
            FilterItem newItem = new FilterItem(checker);

            if (InitFilterByCfg(newItem, cfg))
            {
                item.AddFilterNode(newItem);
            }
            CreateFilterFromCfg(newItem, filterGroup, ++index);
        }