public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort) { this.m_Window = window; this.m_ColumnNames = columnNames; this.m_ColumnSettingsName = columnSettingsName; this.m_ColumnsToShow = columnsToShow; this.m_DetailPane = detailPane; this.m_SortType = sort; this.m_HeaderContent = new GUIContent[columnNames.Length]; this.m_Splitter = null; for (int i = 0; i < this.m_HeaderContent.Length; i++) { this.m_HeaderContent[i] = EditorGUIUtility.TextContent(this.m_ColumnNames[i]); } if (columnsToShow.Length != columnNames.Length) { throw new ArgumentException("Number of columns to show does not match number of column names."); } this.m_SearchHeader = new GUIContent("Search"); this.m_VisibleColumns = new bool[columnNames.Length]; for (int j = 0; j < this.m_VisibleColumns.Length; j++) { this.m_VisibleColumns[j] = true; } this.m_SearchResults = new ProfilerHierarchyGUI.SearchResults(); this.m_SearchResults.Init(100); this.m_Window.Repaint(); }
public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort) { this.m_Window = window; this.m_ColumnNames = columnNames; this.m_ColumnSettingsName = columnSettingsName; this.m_ColumnsToShow = columnsToShow; this.m_DetailPane = detailPane; this.m_SortType = sort; this.m_HeaderContent = new GUIContent[columnNames.Length]; this.m_Splitter = (SplitterState)null; for (int index = 0; index < this.m_HeaderContent.Length; ++index) { this.m_HeaderContent[index] = !this.m_ColumnNames[index].StartsWith("|") ? new GUIContent(this.m_ColumnNames[index]) : EditorGUIUtility.IconContent("ProfilerColumn." + columnsToShow[index].ToString(), this.m_ColumnNames[index]); } if (columnsToShow.Length != columnNames.Length) { throw new ArgumentException("Number of columns to show does not match number of column names."); } this.m_SearchHeader = new GUIContent("Search"); this.m_VisibleColumns = new bool[columnNames.Length]; for (int index = 0; index < this.m_VisibleColumns.Length; ++index) { this.m_VisibleColumns[index] = true; } this.m_SearchResults = new ProfilerHierarchyGUI.SearchResults(); this.m_SearchResults.Init(100); this.m_Window.Repaint(); }
public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort) { this.m_Window = window; this.m_ColumnNames = columnNames; this.m_ColumnSettingsName = columnSettingsName; this.m_ColumnsToShow = columnsToShow; this.m_DetailPane = detailPane; this.m_SortType = sort; this.m_HeaderContent = new GUIContent[columnNames.Length]; this.m_Splitter = null; for (int i = 0; i < this.m_HeaderContent.Length; i++) { this.m_HeaderContent[i] = EditorGUIUtility.TextContent(this.m_ColumnNames[i]); } if (columnsToShow.Length != columnNames.Length) { throw new ArgumentException("Number of columns to show does not match number of column names."); } this.m_SearchHeader = new GUIContent("Search"); this.m_VisibleColumns = new bool[columnNames.Length]; for (int j = 0; j < this.m_VisibleColumns.Length; j++) { this.m_VisibleColumns[j] = true; } this.m_SearchResults = new ProfilerHierarchyGUI.SearchResults(); this.m_SearchResults.Init(100); this.m_Window.Repaint(); }
public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort) { this.m_Window = window; this.m_ColumnNames = columnNames; this.m_ColumnSettingsName = columnSettingsName; this.m_ColumnsToShow = columnsToShow; this.m_DetailPane = detailPane; this.m_SortType = sort; this.m_HeaderContent = new GUIContent[columnNames.Length]; this.m_Splitter = (SplitterState) null; for (int index = 0; index < this.m_HeaderContent.Length; ++index) this.m_HeaderContent[index] = !this.m_ColumnNames[index].StartsWith("|") ? new GUIContent(this.m_ColumnNames[index]) : EditorGUIUtility.IconContent("ProfilerColumn." + columnsToShow[index].ToString(), this.m_ColumnNames[index]); if (columnsToShow.Length != columnNames.Length) throw new ArgumentException("Number of columns to show does not match number of column names."); this.m_SearchHeader = new GUIContent("Search"); this.m_VisibleColumns = new bool[columnNames.Length]; for (int index = 0; index < this.m_VisibleColumns.Length; ++index) this.m_VisibleColumns[index] = true; this.m_SearchResults = new ProfilerHierarchyGUI.SearchResults(); this.m_SearchResults.Init(100); this.m_Window.Repaint(); }