mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Hook up now playing overlay to collections
This commit is contained in:
@ -24,7 +24,15 @@ namespace osu.Game.Overlays.Music
|
||||
set => base.Padding = value;
|
||||
}
|
||||
|
||||
public void Filter(string searchTerm) => ((SearchContainer<RearrangeableListItem<BeatmapSetInfo>>)ListContainer).SearchTerm = searchTerm;
|
||||
public void Filter(FilterCriteria criteria)
|
||||
{
|
||||
var items = (SearchContainer<RearrangeableListItem<BeatmapSetInfo>>)ListContainer;
|
||||
|
||||
foreach (var item in items.OfType<PlaylistItem>())
|
||||
item.InSelectedCollection = criteria.Collection?.Beatmaps.Any(b => b.BeatmapSet.Equals(item.Model)) ?? true;
|
||||
|
||||
items.SearchTerm = criteria.SearchText;
|
||||
}
|
||||
|
||||
public BeatmapSetInfo FirstVisibleSet => Items.FirstOrDefault(i => ((PlaylistItem)ItemMap[i]).MatchingFilter);
|
||||
|
||||
|
Reference in New Issue
Block a user