public void Init(Rect rect, AudioProfilerBackend backend) { if (this.m_HeaderStyle == null) { this.m_HeaderStyle = new GUIStyle((GUIStyle)"OL title"); } this.m_HeaderStyle.alignment = TextAnchor.MiddleLeft; if (this.m_TreeView != null) { return; } this.m_Backend = backend; if (this.m_TreeViewState.columnWidths == null) { int length = AudioProfilerInfoHelper.GetLastColumnIndex() + 1; this.m_TreeViewState.columnWidths = new float[length]; for (int index = 2; index < length; ++index) { this.m_TreeViewState.columnWidths[index] = index == 2 || index == 3 || index >= 11 && index <= 16 ? 75f : 60f; } this.m_TreeViewState.columnWidths[0] = 140f; this.m_TreeViewState.columnWidths[1] = 140f; } this.m_TreeView = new TreeView(this.m_EditorWindow, (TreeViewState)this.m_TreeViewState); ITreeViewGUI gui = (ITreeViewGUI) new AudioProfilerView.AudioProfilerViewGUI(this.m_TreeView); ITreeViewDataSource data = (ITreeViewDataSource) new AudioProfilerView.AudioProfilerDataSource(this.m_TreeView, this.m_Backend); this.m_TreeView.Init(rect, data, gui, (ITreeViewDragging)null); this.m_ColumnHeader = new AudioProfilerView.AudioProfilerViewColumnHeader(this.m_TreeViewState, this.m_Backend); this.m_ColumnHeader.columnWidths = this.m_TreeViewState.columnWidths; this.m_ColumnHeader.minColumnWidth = 30f; this.m_TreeView.selectionChangedCallback += new System.Action <int[]>(this.OnTreeSelectionChanged); }
public void Init(Rect rect, ITreeViewDataSource data, ITreeViewGUI gui, ITreeViewDragging dragging) { this.data = data; this.gui = gui; this.dragging = dragging; this.m_TotalRect = rect; }
public void Init(Rect rect, BackendData backendData) { if (this.m_TreeView != null) { return; } this.m_BackendData = backendData; TreeViewState treeViewState = new TreeViewState(); treeViewState.columnWidths = new float[6] { 250f, 90f, 93f, 98f, 74f, 78f }; this.m_TreeView = new TreeView(this.m_EditorWindow, treeViewState); ITreeViewGUI gui = (ITreeViewGUI) new TestGUI(this.m_TreeView); ITreeViewDragging dragging = (ITreeViewDragging) new TestDragging(this.m_TreeView, this.m_BackendData); ITreeViewDataSource data = !this.m_Lazy ? (ITreeViewDataSource) new TestDataSource(this.m_TreeView, this.m_BackendData) : (ITreeViewDataSource) new LazyTestDataSource(this.m_TreeView, this.m_BackendData); this.m_TreeView.Init(rect, data, gui, dragging); this.m_ColumnHeader = new TreeViewColumnHeader(); this.m_ColumnHeader.columnWidths = treeViewState.columnWidths; this.m_ColumnHeader.minColumnWidth = 30f; this.m_ColumnHeader.columnRenderer += new System.Action <int, Rect>(this.OnColumnRenderer); }
public void Init(Rect rect, ITreeViewDataSource data, ITreeViewGUI gui, ITreeViewDragging dragging) { this.data = data; this.gui = gui; this.dragging = dragging; m_TotalRect = rect; data.OnInitialize(); gui.OnInitialize(); if (dragging != null) { dragging.OnInitialize(); } expandedStateChanged += ExpandedStateHasChanged; m_FramingAnimFloat = new AnimFloat(state.scrollPos.y, AnimatedScrollChanged); }
public void Init(Rect rect, ITreeViewDataSource data, ITreeViewGUI gui, ITreeViewDragging dragging) { this.data = data; this.gui = gui; this.dragging = dragging; this.m_TotalRect = rect; data.OnInitialize(); gui.OnInitialize(); if (dragging != null) { dragging.OnInitialize(); } this.expandedStateChanged = (Action)Delegate.Combine(this.expandedStateChanged, new Action(this.ExpandedStateHasChanged)); this.m_FramingAnimFloat = new AnimFloat(this.state.scrollPos.y, new UnityAction(this.AnimatedScrollChanged)); }
public void Init(Rect rect, ITreeViewDataSource data, ITreeViewGUI gui, ITreeViewDragging dragging) { this.data = data; this.gui = gui; this.dragging = dragging; this.m_TotalRect = rect; data.OnInitialize(); gui.OnInitialize(); if (dragging != null) dragging.OnInitialize(); this.expandedStateChanged += new System.Action(this.ExpandedStateHasChanged); this.m_FramingAnimFloat = new AnimFloat(this.state.scrollPos.y, new UnityAction(this.AnimatedScrollChanged)); }