Hide drag handles of all playlist items not currently being dragged

This commit is contained in:
Dean Herbert
2020-02-06 18:38:00 +09:00
parent 0c30e802c0
commit 48350638a2
2 changed files with 25 additions and 1 deletions

View File

@ -18,6 +18,11 @@ namespace osu.Game.Overlays.Music
public readonly Bindable<BeatmapSetInfo> SelectedSet = new Bindable<BeatmapSetInfo>();
/// <summary>
/// Whether any item is currently being dragged. Used to hide other items' drag handles.
/// </summary>
private readonly BindableBool playlistDragActive = new BindableBool();
public new MarginPadding Padding
{
get => base.Padding;
@ -31,6 +36,7 @@ namespace osu.Game.Overlays.Music
protected override RearrangeableListItem<BeatmapSetInfo> CreateDrawable(BeatmapSetInfo item) => new PlaylistItem(item)
{
SelectedSet = { BindTarget = SelectedSet },
PlaylistDragActive = { BindTarget = playlistDragActive },
RequestSelection = set => RequestSelection?.Invoke(set)
};