예제 #1
0
        protected override void SetupArrayEx(DTFieldNode node, DevTools.ArrayExAttribute attribute)
        {
            switch (node.Name)
            {
            case "m_Groups":
                node.ArrayEx.drawHeaderCallback  = (Rect Rect) => { EditorGUI.LabelField(Rect, "Groups"); };
                node.ArrayEx.drawElementCallback = OnGroupElementGUI;
                node.ArrayEx.onAddCallback       = (ReorderableList l) =>
                {
                    Target.Groups.Insert(Mathf.Clamp(l.index + 1, 0, Target.GroupCount), new CGBoundsGroup("Group"));
                    Target.LastRepeating++;
                    EditorUtility.SetDirty(Target);
                    ensureGroupTabs();
                };
                node.ArrayEx.onRemoveCallback = (ReorderableList l) =>
                {
                    mGroupItemsList = null;
                    Target.Groups.RemoveAt(l.index);
                    Target.LastRepeating--;
                    EditorUtility.SetDirty(Target);

                    //node[1+l.index].Delete();
                    ensureGroupTabs();
                    GUIUtility.ExitGUI();
                };
                node.ArrayEx.onReorderCallback = (ReorderableList l) =>
                {
                    ensureGroupTabs();
                    GUIUtility.ExitGUI();
                };
                break;
            }
        }
예제 #2
0
 protected override void SetupArrayEx(DTFieldNode node, ArrayExAttribute attribute)
 {
     base.SetupArrayEx(node, attribute);
     node.ArrayEx.elementHeight       = (EditorGUIUtility.wideMode || node.ArrayEx.count == 0) ? 21 : 42;
     node.ArrayEx.drawElementCallback = userValueElementGUI;
     node.ArrayEx.onAddCallback       = userValueAdd;
     node.ArrayEx.onRemoveCallback    = userValueDelete;
 }
예제 #3
0
 protected override void SetupArrayEx(DTFieldNode node, DevTools.ArrayExAttribute attribute)
 {
     node.ArrayEx.drawElementCallback = onGameObjectGUI;
     node.ArrayEx.onSelectCallback    = (ReorderableList l) => { selectedIndex = l.index; };
     node.ArrayEx.onAddCallback       = (ReorderableList l) =>
     {
         Target.GameObjects.Insert(Mathf.Clamp(l.index + 1, 0, Target.GameObjects.Count), new CGGameObjectProperties());
         EditorUtility.SetDirty(Target);
     };
 }
예제 #4
0
 protected override void SetupArrayEx(DTFieldNode node, DevTools.ArrayExAttribute attribute)
 {
     node.ArrayEx.elementHeight       = 23;
     node.ArrayEx.drawElementCallback = drawSlot;
 }
 protected override void SetupArrayEx(DTFieldNode node, DevTools.ArrayExAttribute attribute)
 {
     mSplineList = node.ArrayEx;
     mSplineList.onChangedCallback = OnChanged;
 }