示例#1
0
 public void Draw()
 {
     using (new GUILayout.HorizontalScope())
     {
         GUILayout.Space(5);
         using (new GUILayout.VerticalScope())
         {
             EditorGUI.BeginChangeCheck();
             var searchString = searchField.OnGUI(GUILayoutUtility.GetRect(0, 0, 20, 20, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false)), MaintainerPersonalSettings.References.searchString);
             if (EditorGUI.EndChangeCheck())
             {
                 MaintainerPersonalSettings.References.searchString = searchString;
                 treeView.SetSearchString(searchString);
                 treeView.Reload();
             }
             treeView.OnGUI(GUILayoutUtility.GetRect(0, 0, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)));
         }
         GUILayout.Space(5);
     }
 }
        public void Draw()
        {
            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Space(5);
                using (new GUILayout.VerticalScope())
                {
                    EditorGUI.BeginChangeCheck();
                    var searchString =
                        searchField.OnGUI(
                            GUILayoutUtility.GetRect(0, 0, 20, 20, GUILayout.ExpandWidth(true),
                                                     GUILayout.ExpandHeight(false)), MaintainerPersonalSettings.References.searchString);
                    if (EditorGUI.EndChangeCheck())
                    {
                        MaintainerPersonalSettings.References.searchString = searchString;
                        treeView.SetSearchString(searchString);
                        treeView.Reload();
                    }

                    GetSplitterState();

                    CSReflectionTools.BeginVerticalSplit(splitterState, new GUILayoutOption[0]);

                    using (new GUILayout.VerticalScope())
                    {
                        treeView.OnGUI(GUILayoutUtility.GetRect(0, 0, GUILayout.ExpandWidth(true),
                                                                GUILayout.ExpandHeight(true)));
                        GUILayout.Space(2f);
                    }

                    using (new GUILayout.VerticalScope())
                    {
                        GUILayout.Space(2f);

                        using (new GUILayout.VerticalScope(UIHelpers.panelWithoutBackground))
                        {
                            GUILayout.Label("Exact references", UIHelpers.centeredLabel);
                            GUILayout.Space(1f);
                        }

                        GUILayout.Space(-1f);

                        var selected = treeView.GetSelection();
                        if (selected != null && selected.Count > 0)
                        {
                            var selectedRow = treeView.GetRow(selected[0]);
                            exactReferencesPanel.Draw(selectedRow);
                        }
                        else
                        {
                            exactReferencesPanel.Draw(null);
                        }
                    }

                    CSReflectionTools.EndVerticalSplit();

                    SaveSplitterState();
                }

                GUILayout.Space(5);
            }
        }