Example #1
0
        public static void Show <K>(string caption, List <T> elements, Func <T, string, bool> searchStringFilterFunc, Func <T, Texture2D> textureGetter,
                                    Func <T, string> captionGetter, Action <T> selectionCallback, float itemSize = 80, float padding = 10) where K : SelectionWizard <T>
        {
            if (Instance != null)
            {
                Instance.Close();
                Instance = null;
            }

            SelectionWizard <T> self = DisplayWizard <K>(caption);

            self.Elements = elements;
            self.SearchStringFilterFunc = searchStringFilterFunc;
            self.ItemSize          = itemSize;
            self.Padding           = padding;
            self.TextureGetter     = textureGetter;
            self.CaptionGetter     = captionGetter;
            self.SelectionCallback = selectionCallback;
        }
Example #2
0
 private void OnDisable()
 {
     Instance = null;
 }
Example #3
0
 private void OnEnable()
 {
     Instance = this;
 }