Пример #1
0
        public static void Show(Rect activatorPosition, IFuzzyOptionTree optionTree, Action <IFuzzyOption> callback)
        {
            Ensure.That(nameof(optionTree)).IsNotNull(optionTree);

            // Makes sure control exits DelayedTextFields before opening the window
            GUIUtility.keyboardControl = 0;

            if (instance != null)
            {
                instance.Close();
            }
            else
            {
                instance = CreateInstance <FuzzyWindow>();

                instance.Initialize(optionTree, callback);

                instance.CreateWindow(activatorPosition);
            }
        }
Пример #2
0
 private void OnDisable()
 {
     instance = null;
 }
Пример #3
0
 private void OnEnable()
 {
     instance = this;
     query    = string.Empty;
 }