forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationWindowHierarchy.cs
More file actions
47 lines (47 loc) · 1.53 KB
/
Copy pathAnimationWindowHierarchy.cs
File metadata and controls
47 lines (47 loc) · 1.53 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
using System;
using UnityEditor;
using UnityEngine;
namespace UnityEditorInternal
{
internal class AnimationWindowHierarchy
{
private TreeView m_TreeView;
public AnimationWindowState state
{
get;
set;
}
public AnimationWindowHierarchy(AnimationWindowState state, EditorWindow owner, Rect position)
{
this.state = state;
this.Init(owner, position);
}
public void OnGUI(Rect position, EditorWindow owner)
{
this.m_TreeView.OnEvent();
this.m_TreeView.OnGUI(position, GUIUtility.GetControlID(FocusType.Keyboard));
}
public void Init(EditorWindow owner, Rect rect)
{
if (this.state.m_hierarchyState == null)
{
this.state.m_hierarchyState = new AnimationWindowHierarchyState();
}
this.m_TreeView = new TreeView(owner, this.state.m_hierarchyState);
this.state.m_HierarchyData = new AnimationWindowHierarchyDataSource(this.m_TreeView, this.state);
this.m_TreeView.Init(rect, this.state.m_HierarchyData, new AnimationWindowHierarchyGUI(this.m_TreeView, this.state), new AnimationWindowHierarchyDragging());
this.m_TreeView.deselectOnUnhandledMouseDown = true;
TreeView expr_92 = this.m_TreeView;
expr_92.selectionChangedCallback = (Action<int[]>)Delegate.Combine(expr_92.selectionChangedCallback, new Action<int[]>(this.state.OnHierarchySelectionChanged));
this.m_TreeView.ReloadData();
}
internal virtual bool IsRenamingNodeAllowed(TreeViewItem node)
{
return true;
}
public bool IsIDVisible(int id)
{
return this.m_TreeView != null && this.m_TreeView.IsVisible(id);
}
}
}