internal void OnGUI()
        {
            if (AddComponentWindow.s_Styles == null)
            {
                AddComponentWindow.s_Styles = new AddComponentWindow.Styles();
            }
            GUI.Label(new Rect(0f, 0f, base.position.width, base.position.height), GUIContent.none, AddComponentWindow.s_Styles.background);
            if (AddComponentWindow.s_DirtyList)
            {
                this.CreateComponentTree();
            }
            this.HandleKeyboard();
            GUILayout.Space(7f);
            if (!(this.activeParent is AddComponentWindow.NewScriptElement))
            {
                EditorGUI.FocusTextInControl("ComponentSearch");
            }
            Rect rect = GUILayoutUtility.GetRect(10f, 20f);

            rect.x     += 8f;
            rect.width -= 16f;
            GUI.SetNextControlName("ComponentSearch");
            using (new EditorGUI.DisabledScope(this.activeParent is AddComponentWindow.NewScriptElement))
            {
                string text = EditorGUI.SearchField(rect, this.m_DelayedSearch ?? this.m_Search);
                if (text != this.m_Search || this.m_DelayedSearch != null)
                {
                    if (!this.isAnimating)
                    {
                        this.m_Search = (this.m_DelayedSearch ?? text);
                        EditorPrefs.SetString("ComponentSearchString", this.m_Search);
                        this.RebuildSearch();
                        this.m_DelayedSearch = null;
                    }
                    else
                    {
                        this.m_DelayedSearch = text;
                    }
                }
            }
            this.ListGUI(this.activeTree, this.m_Anim, this.GetElementRelative(0), this.GetElementRelative(-1));
            if (this.m_Anim < 1f)
            {
                this.ListGUI(this.activeTree, this.m_Anim + 1f, this.GetElementRelative(-1), this.GetElementRelative(-2));
            }
            if (this.isAnimating && Event.current.type == EventType.Repaint)
            {
                long  ticks = DateTime.Now.Ticks;
                float num   = (float)(ticks - this.m_LastTime) / 1E+07f;
                this.m_LastTime = ticks;
                this.m_Anim     = Mathf.MoveTowards(this.m_Anim, (float)this.m_AnimTarget, num * 4f);
                if (this.m_AnimTarget == 0 && this.m_Anim == 0f)
                {
                    this.m_Anim       = 1f;
                    this.m_AnimTarget = 1;
                    this.m_Stack.RemoveAt(this.m_Stack.Count - 1);
                }
                base.Repaint();
            }
        }
 internal void OnGUI()
 {
   if (AddComponentWindow.s_Styles == null)
     AddComponentWindow.s_Styles = new AddComponentWindow.Styles();
   GUI.Label(new Rect(0.0f, 0.0f, this.position.width, this.position.height), GUIContent.none, AddComponentWindow.s_Styles.background);
   if (AddComponentWindow.s_DirtyList)
     this.CreateComponentTree();
   this.HandleKeyboard();
   GUILayout.Space(7f);
   if (!(this.activeParent is AddComponentWindow.NewScriptElement))
     EditorGUI.FocusTextInControl("ComponentSearch");
   Rect rect = GUILayoutUtility.GetRect(10f, 20f);
   rect.x += 8f;
   rect.width -= 16f;
   GUI.SetNextControlName("ComponentSearch");
   EditorGUI.BeginDisabledGroup(this.activeParent is AddComponentWindow.NewScriptElement);
   string str = EditorGUI.SearchField(rect, this.m_DelayedSearch ?? this.m_Search);
   if (str != this.m_Search || this.m_DelayedSearch != null)
   {
     if (!this.isAnimating)
     {
       this.m_Search = this.m_DelayedSearch ?? str;
       EditorPrefs.SetString("ComponentSearchString", this.m_Search);
       this.RebuildSearch();
       this.m_DelayedSearch = (string) null;
     }
     else
       this.m_DelayedSearch = str;
   }
   EditorGUI.EndDisabledGroup();
   this.ListGUI(this.activeTree, this.m_Anim, this.GetElementRelative(0), this.GetElementRelative(-1));
   if ((double) this.m_Anim < 1.0)
     this.ListGUI(this.activeTree, this.m_Anim + 1f, this.GetElementRelative(-1), this.GetElementRelative(-2));
   if (!this.isAnimating || Event.current.type != EventType.Repaint)
     return;
   long ticks = DateTime.Now.Ticks;
   float num = (float) (ticks - this.m_LastTime) / 1E+07f;
   this.m_LastTime = ticks;
   this.m_Anim = Mathf.MoveTowards(this.m_Anim, (float) this.m_AnimTarget, num * 4f);
   if (this.m_AnimTarget == 0 && (double) this.m_Anim == 0.0)
   {
     this.m_Anim = 1f;
     this.m_AnimTarget = 1;
     this.m_Stack.RemoveAt(this.m_Stack.Count - 1);
   }
   this.Repaint();
 }