Rewrite PlaylistList as CompositeDrawable and remove all backwards PlaylistList references

Now handles drag at a PlaylistList.ItemsScrollContainer level (private class), and PlaylistList itself is no longer a Container so it only supports adding BeatmapSets. Sorry for the rewrite x.x.
This commit is contained in:
smoogipooo
2017-09-04 13:12:12 +09:00
parent 9b0309e683
commit 3b575444be
3 changed files with 188 additions and 144 deletions

View File

@ -92,7 +92,7 @@ namespace osu.Game.Overlays.Music
protected override void LoadComplete()
{
base.LoadComplete();
beatmapBacking.ValueChanged += b => list.SelectedItem = b?.BeatmapSetInfo;
beatmapBacking.ValueChanged += b => list.SelectedSet = b?.BeatmapSetInfo;
beatmapBacking.TriggerChange();
}
@ -126,23 +126,23 @@ namespace osu.Game.Overlays.Music
public void PlayPrevious()
{
var playable = list.PreviousItem;
var playable = list.PreviousSet;
if (playable != null)
{
playSpecified(playable.Beatmaps[0]);
list.SelectedItem = playable;
list.SelectedSet = playable;
}
}
public void PlayNext()
{
var playable = list.NextItem;
var playable = list.NextSet;
if (playable != null)
{
playSpecified(playable.Beatmaps[0]);
list.SelectedItem = playable;
list.SelectedSet = playable;
}
}