Example #1
0
        public override void SetActive(bool active)
        {
            base.SetActive(active);

            if (active && !DoneScrollPoolInit)
            {
                LayoutRebuilder.ForceRebuildLayoutImmediate(this.Rect);
                logScrollPool.Initialize(this);
                DoneScrollPoolInit = true;
            }

            logScrollPool.Refresh(true, false);
        }
Example #2
0
        public void DoSearch()
        {
            cachedCellTexts.Clear();

            if (m_context == SearchContext.Singleton)
            {
                currentResults = SearchProvider.SingletonSearch(nameInputField.Text);
            }
            else if (m_context == SearchContext.StaticClass)
            {
                currentResults = SearchProvider.StaticClassSearch(nameInputField.Text);
            }
            else
            {
                string compType = "";
                if (m_context == SearchContext.UnityObject)
                {
                    compType = this.desiredTypeInput;
                }

                currentResults = SearchProvider.UnityObjectSearch(nameInputField.Text, compType, m_context, m_childFilter, m_sceneFilter);
            }

            dataHandler.RefreshData();
            resultsScrollPool.Refresh(true);

            resultsLabel.text = $"{currentResults.Count} results";
        }
        public void SetSuggestions(IEnumerable <Suggestion> suggestions)
        {
            Suggestions   = suggestions as List <Suggestion> ?? suggestions.ToList();
            SelectedIndex = 0;

            if (!Suggestions.Any())
            {
                base.UIRoot.SetActive(false);
            }
            else
            {
                base.UIRoot.SetActive(true);
                base.UIRoot.transform.SetAsLastSibling();
                dataHandler.RefreshData();
                scrollPool.Refresh(true, true);
            }
        }
        public override void Update()
        {
            if (!this.IsActive)
            {
                return;
            }

            if (!StaticOnly && Target.IsNullOrDestroyed(false))
            {
                InspectorManager.ReleaseInspector(this);
                return;
            }

            // check filter changes or force-refresh
            if (refreshWanted || NameFilter != lastNameFilter || FlagsFilter != lastFlagsFilter || lastMemberFilter != MemberFilter)
            {
                lastNameFilter   = NameFilter;
                lastFlagsFilter  = FlagsFilter;
                lastMemberFilter = MemberFilter;

                FilterMembers();
                MemberScrollPool.Refresh(true, true);
                refreshWanted = false;
            }

            // once-per-second updates
            if (timeOfLastAutoUpdate.OccuredEarlierThan(1))
            {
                timeOfLastAutoUpdate = Time.realtimeSinceStartup;

                if (this.UnityObjectRef)
                {
                    nameInput.Text        = UnityObjectRef.name;
                    this.Tab.TabText.text = $"{currentBaseTabText} \"{UnityObjectRef.name}\"";
                }

                if (AutoUpdateWanted)
                {
                    UpdateDisplayedMembers();
                }
            }
        }
Example #5
0
 public void ShowResults()
 {
     dataHandler.RefreshData();
     buttonScrollPool.Refresh(true, true);
 }
 public void Clear()
 {
     RefreshData();
     ScrollPool.Refresh(true, true);
 }