Ejemplo n.º 1
0
 public void Init(Rect rect, AudioProfilerBackend backend)
 {
     this.m_HeaderStyle = "PR Label";
     if (this.m_TreeView == null)
     {
         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] = (i < 0x12) ? ((float)0x37) : ((float)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 AudioProfilerViewGUI(this.m_TreeView);
         ITreeViewDataSource data = new AudioProfilerDataSource(this.m_TreeView, this.m_Backend);
         this.m_TreeView.Init(rect, data, gui, null);
         this.m_ColumnHeader = new AudioProfilerViewColumnHeader(this.m_TreeViewState, this.m_Backend);
         this.m_ColumnHeader.columnWidths         = this.m_TreeViewState.columnWidths;
         this.m_ColumnHeader.minColumnWidth       = 30f;
         this.m_TreeView.selectionChangedCallback = (Action <int[]>)Delegate.Combine(this.m_TreeView.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged));
     }
 }
Ejemplo n.º 2
0
 public void Init(Rect rect, AudioProfilerBackend backend)
 {
     this.m_HeaderStyle = "PR Label";
     if (this.m_TreeView == null)
     {
         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] = (i < 0x12) ? ((float) 0x37) : ((float) 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 AudioProfilerViewGUI(this.m_TreeView);
         ITreeViewDataSource data = new AudioProfilerDataSource(this.m_TreeView, this.m_Backend);
         this.m_TreeView.Init(rect, data, gui, null);
         this.m_ColumnHeader = new AudioProfilerViewColumnHeader(this.m_TreeViewState, this.m_Backend);
         this.m_ColumnHeader.columnWidths = this.m_TreeViewState.columnWidths;
         this.m_ColumnHeader.minColumnWidth = 30f;
         this.m_TreeView.selectionChangedCallback = (Action<int[]>) Delegate.Combine(this.m_TreeView.selectionChangedCallback, new Action<int[]>(this.OnTreeSelectionChanged));
     }
 }