private void OnGUI() { EditorGUIUtility.labelWidth = 130f; EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); this.m_SelectedTab = (LightingExplorerWindow.TabType)GUILayout.Toolbar((int)this.m_SelectedTab, LightingExplorerWindow.Styles.TabTypes, "LargeButton", GUI.ToolbarButtonSize.FitToContents, new GUILayoutOption[0]); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); if (this.m_TableTabs != null && this.m_SelectedTab >= LightingExplorerWindow.TabType.Lights && this.m_SelectedTab < (LightingExplorerWindow.TabType) this.m_TableTabs.Count) { this.m_TableTabs[(int)this.m_SelectedTab].OnGUI(); } EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); }
private void OnGUI() { EditorGUIUtility.labelWidth = 130f; EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(this.toolbarPadding); float width = base.position.width - this.toolbarPadding * 2f; this.m_SelectedTab = (LightingExplorerWindow.TabType)GUILayout.Toolbar((int)this.m_SelectedTab, LightingExplorerWindow.Styles.TabTypes, "LargeButton", new GUILayoutOption[] { GUILayout.Width(width) }); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); if (this.m_TableTabs != null && this.m_SelectedTab >= LightingExplorerWindow.TabType.Lights && this.m_SelectedTab < (LightingExplorerWindow.TabType) this.m_TableTabs.Count) { this.m_TableTabs[(int)this.m_SelectedTab].OnGUI(); } EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); }