Exemplo n.º 1
0
 //------------------------------------------------------------------------/
 // CTOR
 //------------------------------------------------------------------------/
 private StratusSearchablePopup(string[] displayedOptions, int selectedIndex, System.Action <int> onSelection)
 {
     this.list          = new StratusFilteredStringList(displayedOptions);
     this.selectedIndex = this.hoverIndex = this.scrollToIndex = selectedIndex;
     this.onSelection   = onSelection;
     this.scrollOffset  = this.GetWindowSize().y - rowHeight * 2f;
 }
Exemplo n.º 2
0
 private void SetFilter(string[] entries)
 {
     this.entryIndex = new Dictionary <string, int>();
     for (int i = 0; i < entries.Length; ++i)
     {
         this.entryIndex.Add(entries[i], i);
     }
     this.searchFilter = new StratusFilteredStringList(entries);
 }