Пример #1
0
        private void DrawHeader()
        {
            GUILayout.BeginHorizontal();
            GUILayout.Label("Search Providers", Styles.filterHeader);
            GUILayout.FlexibleSpace();
            EditorGUI.BeginChangeCheck();
            GUI.SetNextControlName($"Box_{m_ToggleFilterNextIndex++}");
            bool isEnabled = GUILayout.Toggle(SearchService.Filter.providerFilters.All(p => p.entry.isEnabled), "", Styles.filterToggle, GUILayout.ExpandWidth(false));

            if (EditorGUI.EndChangeCheck())
            {
                foreach (var provider in SearchService.Filter.providerFilters)
                {
                    SearchService.Filter.SetFilter(isEnabled, provider.entry.name.id);
                }
                quickSearchTool.Refresh();
            }

            GUILayout.EndHorizontal();
        }
Пример #2
0
        private static IEnumerator WaitForSearchCompleted(QuickSearchTool qsWindow)
        {
            qsWindow.Refresh();
            yield return(null);

            while (AsyncSearchSession.SearchInProgress)
            {
                yield return(null);
            }
            yield return(null);
        }
Пример #3
0
        private IEnumerator PrepareSearchTool(QuickSearchTool qsWindow)
        {
            qsWindow.m_SendAnalyticsEvent = true;
            Assert.IsNotNull(qsWindow);
            yield return(null);

            qsWindow.Focus();
            yield return(null);

            yield return(SendKeyCharacterEvent(qsWindow, (char)0, KeyCode.Backspace, EventModifiers.FunctionKey));

            qsWindow.Refresh();
            while (AsyncSearchSession.SearchInProgress)
            {
                yield return(null);
            }
            yield return(null);

            Assert.IsEmpty(qsWindow.Context.searchText);
        }