public override void Refresh(bool newData) { base.Refresh(newData); currentTab = UserSettings.Instance.referencesFinder.selectedTab; switch (currentTab) { case ReferenceFinderTab.Project: projectTab.Refresh(newData); break; case ReferenceFinderTab.Scene: hierarchyTab.Refresh(newData); break; default: throw new ArgumentOutOfRangeException(); } }
protected override void DrawLeftColumnHeader() { using (new GUILayout.VerticalScope()) { GUILayout.Space(10); using (new GUILayout.HorizontalScope()) { GUILayout.Space(10); GUILayout.Label("<size=16><b>Search scope</b></size>", UIHelpers.richLabel); GUILayout.FlexibleSpace(); using (new GUILayout.VerticalScope()) { /*GUILayout.Space(-3);*/ //if (UIHelpers.ImageButton(null, CSIcons.HelpOutline, GUILayout.ExpandWidth(false))) if (UIHelpers.IconButton(CSIcons.HelpOutline, GUILayout.ExpandWidth(false))) { // TODO: update EditorUtility.DisplayDialog(ReferencesFinder.ModuleName + " scopes help", "Use " + projectTab.Caption.text + " scope to figure out where any specific asset is referenced in whole project.\n\n" + "Use " + hierarchyTab.Caption.text + " scope to figure out where any specific Game Object or component is referenced in active scene or opened prefab.", "OK"); } } GUILayout.Space(10); } using (new GUILayout.HorizontalScope()) { GUILayout.Space(10); UIHelpers.Separator(); GUILayout.Space(10); } GUILayout.Space(10); EditorGUI.BeginChangeCheck(); using (new GUILayout.HorizontalScope()) { GUILayout.Space(10); currentTab = (ReferenceFinderTab)GUILayout.SelectionGrid((int)currentTab, tabsCaptions, 1, GUILayout.Height(56), GUILayout.ExpandWidth(true)); GUILayout.Space(10); } if (EditorGUI.EndChangeCheck()) { UserSettings.Instance.referencesFinder.selectedTab = currentTab; Refresh(false); } switch (currentTab) { case ReferenceFinderTab.Project: projectTab.DrawLeftColumnHeader(); break; case ReferenceFinderTab.Scene: hierarchyTab.DrawLeftColumnHeader(); break; default: throw new ArgumentOutOfRangeException(); } } base.DrawLeftColumnHeader(); }