//------------------------------------------------------------------------/
 // CTOR
 //------------------------------------------------------------------------/
 private StratusSearchablePopup(string[] displayedOptions, int selectedIndex, System.Action <int> onSelection)
 {
     this.list          = new FilteredStringList(displayedOptions);
     this.selectedIndex = this.hoverIndex = this.scrollToIndex = selectedIndex;
     this.onSelection   = onSelection;
     this.scrollOffset  = this.GetWindowSize().y - rowHeight * 2f;
 }
Esempio n. 2
0
        private void SetFilter()
        {
            // If there's no function provided to name the entries, use the default
            if (this.entryFunction == null)
            {
                this.entryFunction = (x => x);
            }

            string[] entries = null;
            if (this.hasDisplayOptions)
            {
                entries = this.dropdown.GetDisplayOptions();
            }

            this.searchFilter = new FilteredStringList(entries);
        }