/// <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]); } }
/// <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]); } }