Make ShowDragHandle into a bindable

This commit is contained in:
smoogipoo
2020-09-08 16:36:36 +09:00
parent 17e8171827
commit 1260e30cde
3 changed files with 15 additions and 14 deletions

View File

@ -12,13 +12,13 @@ namespace osu.Game.Graphics.Containers
/// <summary>
/// Whether any item is currently being dragged. Used to hide other items' drag handles.
/// </summary>
private readonly BindableBool playlistDragActive = new BindableBool();
protected readonly BindableBool DragActive = new BindableBool();
protected override ScrollContainer<Drawable> CreateScrollContainer() => new OsuScrollContainer();
protected sealed override RearrangeableListItem<TModel> CreateDrawable(TModel item) => CreateOsuDrawable(item).With(d =>
{
d.PlaylistDragActive.BindTo(playlistDragActive);
d.DragActive.BindTo(DragActive);
});
protected abstract OsuRearrangeableListItem<TModel> CreateOsuDrawable(TModel item);