Skip to content

Commit

Permalink
Fix Random button focusing incorrect sets when in non-title sorting m…
Browse files Browse the repository at this point in the history
…odes
  • Loading branch information
Wieku committed Oct 13, 2024
1 parent 101b1b7 commit 4c5f1b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions launcher/songselect.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ func (m *songSelectPopup) drawSongSelect() {
imgui.TableNextColumn()

if focusMap && m.sizeCalculated > 1 {
if m.bld.currentMap != nil && m.bld.currentMap.Dir == b.bMaps[0].Dir {
imgui.SetScrollYFloat(b.bounds.X)
if m.bld.currentMap != nil && m.bld.currentMap.Dir == b.bMaps[0].Dir { // Quick compare for the current set
if slices.ContainsFunc(b.bMaps, func(sub *beatmap.BeatMap) bool { return sub.MD5 == m.bld.currentMap.MD5 }) { // Search for a partitioned set containing that specific diff
imgui.SetScrollYFloat(b.bounds.X)
}
}
}

Expand Down

0 comments on commit 4c5f1b4

Please sign in to comment.