1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Merge branch 'master' into drawableflag-ctor

This commit is contained in:
Dean Herbert 2017-07-24 16:46:20 +09:00 committed by GitHub
commit 038e47ceda
2 changed files with 14 additions and 0 deletions

View File

@ -73,6 +73,17 @@ namespace osu.Game.Overlays.Music
};
}
public void AddBeatmapSet(BeatmapSetInfo beatmapSet)
{
items.Add(new PlaylistItem(beatmapSet) { OnSelect = itemSelected });
}
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet)
{
PlaylistItem itemToRemove = items.Children.FirstOrDefault(item => item.BeatmapSetInfo == beatmapSet);
if (itemToRemove != null) items.Remove(itemToRemove);
}
private class ItemSearchContainer : FillFlowContainer<PlaylistItem>, IHasFilterableChildren
{
public string[] FilterTerms => new string[] { };

View File

@ -80,6 +80,9 @@ namespace osu.Game.Overlays.Music
list.BeatmapSets = BeatmapSets = beatmaps.GetAllWithChildren<BeatmapSetInfo>(b => !b.DeletePending).ToList();
beatmaps.BeatmapSetAdded += s => list.AddBeatmapSet(s);
beatmaps.BeatmapSetRemoved += s => list.RemoveBeatmapSet(s);
beatmapBacking.BindTo(game.Beatmap);
filter.Search.OnCommit = (sender, newText) =>