Example #1
0
        private MapListView()
        {
            _selectionHandler             = new UISelectionHandler(EKeyboardKey.Up, EKeyboardKey.Down, EKeyboardKey.Enter);
            _selectionHandler.OnSelected += OnMapSelected;

            _pageHandler                = new UIElementPageHandler <MapInfo>(EKeyboardKey.Left, EKeyboardKey.Right);
            _pageHandler.Footer         = "    {2}:{3}  {0} {1}";
            _pageHandler.EntriesPerPage = 9;
        }
Example #2
0
 public PracticeView()
 {
     _selectionHandler = new UISelectionHandler(EKeyboardKey.Up, EKeyboardKey.Down, EKeyboardKey.Enter);
     // the max zero indexed entry (2 entries - 1 since zero indexed)
     _selectionHandler.MaxIdx = 3;
     // when the "selection" key is pressed (we set it to enter above)
     _selectionHandler.OnSelected += OnEntrySelected;
     // since you quite often want to have an indicator of the selected item
     // I added helper function for that.
     // Basically you specify the prefix and suffix added to the selected item
     // and an prefix and suffix if the item isn't selected
     _selectionHandler.ConfigureSelectionIndicator($"<color=#{highlightColor}>></color> ", "", "  ", "");
 }