示例#1
0
        /// <summary>
        /// Selects the previous map in the map list.
        /// </summary>
        public void SelectPrevMap()
        {
            var maps  = mapList.Value;
            int index = GetSelectedMapIndex() - 1;

            if (index < 0)
            {
                MapSelection.SelectMap(maps[maps.Count - 1]);
            }
            else
            {
                MapSelection.SelectMap(maps[index]);
            }
        }
示例#2
0
        /// <summary>
        /// Selects the next map in the map list.
        /// </summary>
        public void SelectNextMap()
        {
            var maps  = mapList.Value;
            int index = GetSelectedMapIndex() + 1;

            if (index >= maps.Count)
            {
                MapSelection.SelectMap(maps[0]);
            }
            else
            {
                MapSelection.SelectMap(maps[index]);
            }
        }