forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddCurvesPopupHierarchy.cs
More file actions
45 lines (45 loc) · 1.34 KB
/
Copy pathAddCurvesPopupHierarchy.cs
File metadata and controls
45 lines (45 loc) · 1.34 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
using System;
using UnityEditor;
using UnityEngine;
namespace UnityEditorInternal
{
internal class AddCurvesPopupHierarchy
{
private TreeView m_TreeView;
private TreeViewState m_TreeViewState;
private AddCurvesPopupHierarchyDataSource m_TreeViewDataSource;
private AnimationWindowState state
{
get;
set;
}
public AddCurvesPopupHierarchy(AnimationWindowState state)
{
this.state = state;
}
public void OnGUI(Rect position, EditorWindow owner)
{
this.InitIfNeeded(owner, position);
this.m_TreeView.OnEvent();
this.m_TreeView.OnGUI(position, GUIUtility.GetControlID(FocusType.Keyboard));
}
public void InitIfNeeded(EditorWindow owner, Rect rect)
{
if (this.m_TreeViewState == null)
{
this.m_TreeViewState = new TreeViewState();
this.m_TreeView = new TreeView(owner, this.m_TreeViewState);
this.m_TreeView.deselectOnUnhandledMouseDown = true;
this.m_TreeViewDataSource = new AddCurvesPopupHierarchyDataSource(this.m_TreeView, this.state);
TreeViewGUI gui = new AddCurvesPopupHierarchyGUI(this.m_TreeView, this.state, owner);
this.m_TreeView.Init(rect, this.m_TreeViewDataSource, gui, new GameObjectsTreeViewDragging(this.m_TreeView));
this.m_TreeViewDataSource.UpdateData();
return;
}
}
internal virtual bool IsRenamingNodeAllowed(TreeViewItem node)
{
return false;
}
}
}