protected virtual void OnGUI() { UIHelpers.SetupStyles(); currentEvent = Event.current; currentEventType = currentEvent.type; EditorGUI.BeginChangeCheck(); { EditorGUI.BeginChangeCheck(); currentTabIndex = GUILayout.Toolbar(currentTabIndex, tabsCaptions, UIHelpers.richButton, GUILayout.Height(21)); if (EditorGUI.EndChangeCheck()) { RemoveNotification(); } currentTab = tabs[currentTabIndex]; } if (EditorGUI.EndChangeCheck()) { currentTab.Show(this); if (TabChangedCallback != null) { TabChangedCallback.Invoke(currentTabIndex); } } currentTab.currentEvent = currentEvent; currentTab.currentEventType = currentEventType; currentTab.ProcessDrags(); currentTab.Draw(); }
protected virtual void OnGUI() { UIHelpers.SetupStyles(); currentEvent = Event.current; currentEventType = currentEvent.type; EditorGUI.BeginChangeCheck(); currentTabIndex = GUILayout.Toolbar(currentTabIndex, tabsNames, GUILayout.ExpandWidth(false)); currentTab = tabs[currentTabIndex]; if (EditorGUI.EndChangeCheck()) { currentTab.Show(this); if (TabChangedCallback != null) { TabChangedCallback.Invoke(currentTabIndex); } } currentTab.currentEvent = currentEvent; currentTab.currentEventType = currentEventType; currentTab.ProcessDrags(); currentTab.Draw(); }