public void Init(Rect rect, AudioProfilerBackend backend) { this.m_HeaderStyle = "PR Label"; if (this.m_TreeView != null) { return; } this.m_Backend = backend; if (this.m_TreeViewState.columnWidths == null) { int num = AudioProfilerInfoHelper.GetLastColumnIndex() + 1; this.m_TreeViewState.columnWidths = new float[num]; for (int i = 0; i < num; i++) { this.m_TreeViewState.columnWidths[i] = (float)((i < 18) ? 55 : 80); } this.m_TreeViewState.columnWidths[0] = 200f; this.m_TreeViewState.columnWidths[1] = 200f; this.m_TreeViewState.columnWidths[2] = 80f; this.m_TreeViewState.columnWidths[3] = 80f; } this.m_TreeView = new TreeView(this.m_EditorWindow, this.m_TreeViewState); ITreeViewGUI gui = new AudioProfilerView.AudioProfilerViewGUI(this.m_TreeView); ITreeViewDataSource data = new AudioProfilerView.AudioProfilerDataSource(this.m_TreeView, this.m_Backend); this.m_TreeView.Init(rect, data, gui, 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; TreeView expr_14C = this.m_TreeView; expr_14C.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_14C.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged)); }
public void Init(Rect rect, AudioProfilerBackend backend) { if (this.m_HeaderStyle == null) { this.m_HeaderStyle = new 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 num = AudioProfilerInfoHelper.GetLastColumnIndex() + 1; this.m_TreeViewState.columnWidths = new float[num]; for (int i = 2; i < num; i++) { this.m_TreeViewState.columnWidths[i] = (float)((i != 2 && i != 3 && (i < 11 || i > 16)) ? 60 : 75); } this.m_TreeViewState.columnWidths[0] = 140f; this.m_TreeViewState.columnWidths[1] = 140f; } this.m_TreeView = new TreeView(this.m_EditorWindow, this.m_TreeViewState); ITreeViewGUI gui = new AudioProfilerView.AudioProfilerViewGUI(this.m_TreeView); ITreeViewDataSource data = new AudioProfilerView.AudioProfilerDataSource(this.m_TreeView, this.m_Backend); this.m_TreeView.Init(rect, data, gui, 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; TreeView expr_15A = this.m_TreeView; expr_15A.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_15A.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged)); }
public void Init(Rect rect, AudioProfilerBackend backend) { this.m_HeaderStyle = "PR Label"; if (this.m_TreeView != null) { return; } this.m_Backend = backend; if (this.m_TreeViewState.columnWidths == null) { int num = AudioProfilerInfoHelper.GetLastColumnIndex() + 1; this.m_TreeViewState.columnWidths = new float[num]; for (int i = 0; i < num; i++) { this.m_TreeViewState.columnWidths[i] = (float)((i < 18) ? 55 : 80); } this.m_TreeViewState.columnWidths[0] = 200f; this.m_TreeViewState.columnWidths[1] = 200f; this.m_TreeViewState.columnWidths[2] = 80f; this.m_TreeViewState.columnWidths[3] = 80f; } this.m_TreeView = new TreeView(this.m_EditorWindow, this.m_TreeViewState); ITreeViewGUI gui = new AudioProfilerView.AudioProfilerViewGUI(this.m_TreeView); ITreeViewDataSource data = new AudioProfilerView.AudioProfilerDataSource(this.m_TreeView, this.m_Backend); this.m_TreeView.Init(rect, data, gui, 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; TreeView expr_14C = this.m_TreeView; expr_14C.selectionChangedCallback = (Action<int[]>)Delegate.Combine(expr_14C.selectionChangedCallback, new Action<int[]>(this.OnTreeSelectionChanged)); }