-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathSearchTree.cs
More file actions
47 lines (39 loc) · 1.06 KB
/
SearchTree.cs
File metadata and controls
47 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using UnityEngine;
namespace UnityEditor.Experimental.GraphView
{
[Serializable]
public class SearchTreeEntry : IComparable<SearchTreeEntry>
{
public int level;
public GUIContent content;
public object userData;
public SearchTreeEntry(GUIContent content)
{
this.content = content;
}
public string name
{
get { return content.text; }
}
public int CompareTo(SearchTreeEntry o)
{
return name.CompareTo(o.name);
}
}
[Serializable]
public class SearchTreeGroupEntry : SearchTreeEntry
{
internal int selectedIndex;
internal Vector2 scroll;
public SearchTreeGroupEntry(GUIContent content, int level = 0)
: base(content)
{
this.content = content;
this.level = level;
}
}
}