Skip to content

Commit

Permalink
Fixed scrolling bug & argument exception not using _selectedIndex var…
Browse files Browse the repository at this point in the history
…iable (#316)
  • Loading branch information
JayDiddyThaGOAT authored May 13, 2023
1 parent 7984581 commit 1d22dce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Assets/Script/UI/MusicLibrary/SongSelection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ private set {
}

// Wrap
if (_selectedIndex < 0) {
_selectedIndex = _songs.Count - _selectedIndex - 2;
if (_selectedIndex <= 0) {
_selectedIndex = _songs.Count - 1;
} else if (_selectedIndex >= _songs.Count) {
_selectedIndex -= _songs.Count;
_selectedIndex = 1;
}

if (_songs[value] is SongViewType song) {
if (_songs[_selectedIndex] is SongViewType song) {
GameManager.Instance.SelectedSong = song.SongEntry;
}

Expand Down

0 comments on commit 1d22dce

Please sign in to comment.