Exemplo n.º 1
0
            protected override void RowGUI(RowGUIArgs args)
            {
                var rect = new Rect(args.rowRect);

                rect.yMin   += Offset / 2;
                rect.height -= Offset;
                TreeViewExtensions.DrawRowBackground(args.rowRect, args.row);
                _list[args.row] = EditorGUI.ObjectField(rect, new GUIContent(args.label), _list[args.row], typeof(TextAsset), false);
            }
Exemplo n.º 2
0
        protected override void RowGUI(RowGUIArgs args)
        {
            TreeViewExtensions.DrawRowBackground(args.rowRect, args.row);

            var value = _values[args.row];

            EditorGUI.BeginChangeCheck();
            GUI.Label(GetLabelRect(args.rowRect, 18), args.label);
            value = GUI.Toggle(args.rowRect, value, GUIContent.none);
            if (EditorGUI.EndChangeCheck())
            {
                _values[args.row] = value;
                if (value)
                {
                    _list.Remove(_groups[args.row]);
                }
                else
                {
                    _list.Add(_groups[args.row]);
                }
            }
        }