mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Remove ILive
remnants
This commit is contained in:
@ -13,11 +13,11 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Music
|
||||
{
|
||||
public class Playlist : OsuRearrangeableListContainer<ILive<BeatmapSetInfo>>
|
||||
public class Playlist : OsuRearrangeableListContainer<Live<BeatmapSetInfo>>
|
||||
{
|
||||
public Action<ILive<BeatmapSetInfo>> RequestSelection;
|
||||
public Action<Live<BeatmapSetInfo>> RequestSelection;
|
||||
|
||||
public readonly Bindable<ILive<BeatmapSetInfo>> SelectedSet = new Bindable<ILive<BeatmapSetInfo>>();
|
||||
public readonly Bindable<Live<BeatmapSetInfo>> SelectedSet = new Bindable<Live<BeatmapSetInfo>>();
|
||||
|
||||
public new MarginPadding Padding
|
||||
{
|
||||
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Music
|
||||
|
||||
public void Filter(FilterCriteria criteria)
|
||||
{
|
||||
var items = (SearchContainer<RearrangeableListItem<ILive<BeatmapSetInfo>>>)ListContainer;
|
||||
var items = (SearchContainer<RearrangeableListItem<Live<BeatmapSetInfo>>>)ListContainer;
|
||||
|
||||
foreach (var item in items.OfType<PlaylistItem>())
|
||||
item.InSelectedCollection = criteria.Collection?.Beatmaps.Any(b => item.Model.ID == b.BeatmapSet?.ID) ?? true;
|
||||
@ -35,15 +35,15 @@ namespace osu.Game.Overlays.Music
|
||||
items.SearchTerm = criteria.SearchText;
|
||||
}
|
||||
|
||||
public ILive<BeatmapSetInfo> FirstVisibleSet => Items.FirstOrDefault(i => ((PlaylistItem)ItemMap[i]).MatchingFilter);
|
||||
public Live<BeatmapSetInfo> FirstVisibleSet => Items.FirstOrDefault(i => ((PlaylistItem)ItemMap[i]).MatchingFilter);
|
||||
|
||||
protected override OsuRearrangeableListItem<ILive<BeatmapSetInfo>> CreateOsuDrawable(ILive<BeatmapSetInfo> item) => new PlaylistItem(item)
|
||||
protected override OsuRearrangeableListItem<Live<BeatmapSetInfo>> CreateOsuDrawable(Live<BeatmapSetInfo> item) => new PlaylistItem(item)
|
||||
{
|
||||
SelectedSet = { BindTarget = SelectedSet },
|
||||
RequestSelection = set => RequestSelection?.Invoke(set)
|
||||
};
|
||||
|
||||
protected override FillFlowContainer<RearrangeableListItem<ILive<BeatmapSetInfo>>> CreateListFillFlowContainer() => new SearchContainer<RearrangeableListItem<ILive<BeatmapSetInfo>>>
|
||||
protected override FillFlowContainer<RearrangeableListItem<Live<BeatmapSetInfo>>> CreateListFillFlowContainer() => new SearchContainer<RearrangeableListItem<Live<BeatmapSetInfo>>>
|
||||
{
|
||||
Spacing = new Vector2(0, 3),
|
||||
LayoutDuration = 200,
|
||||
|
@ -17,11 +17,11 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Music
|
||||
{
|
||||
public class PlaylistItem : OsuRearrangeableListItem<ILive<BeatmapSetInfo>>, IFilterable
|
||||
public class PlaylistItem : OsuRearrangeableListItem<Live<BeatmapSetInfo>>, IFilterable
|
||||
{
|
||||
public readonly Bindable<ILive<BeatmapSetInfo>> SelectedSet = new Bindable<ILive<BeatmapSetInfo>>();
|
||||
public readonly Bindable<Live<BeatmapSetInfo>> SelectedSet = new Bindable<Live<BeatmapSetInfo>>();
|
||||
|
||||
public Action<ILive<BeatmapSetInfo>> RequestSelection;
|
||||
public Action<Live<BeatmapSetInfo>> RequestSelection;
|
||||
|
||||
private TextFlowContainer text;
|
||||
private ITextPart titlePart;
|
||||
@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Music
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; }
|
||||
|
||||
public PlaylistItem(ILive<BeatmapSetInfo> item)
|
||||
public PlaylistItem(Live<BeatmapSetInfo> item)
|
||||
: base(item)
|
||||
{
|
||||
Padding = new MarginPadding { Left = 5 };
|
||||
|
@ -24,9 +24,9 @@ namespace osu.Game.Overlays.Music
|
||||
private const float transition_duration = 600;
|
||||
private const float playlist_height = 510;
|
||||
|
||||
public IBindableList<ILive<BeatmapSetInfo>> BeatmapSets => beatmapSets;
|
||||
public IBindableList<Live<BeatmapSetInfo>> BeatmapSets => beatmapSets;
|
||||
|
||||
private readonly BindableList<ILive<BeatmapSetInfo>> beatmapSets = new BindableList<ILive<BeatmapSetInfo>>();
|
||||
private readonly BindableList<Live<BeatmapSetInfo>> beatmapSets = new BindableList<Live<BeatmapSetInfo>>();
|
||||
|
||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
@ -144,7 +144,7 @@ namespace osu.Game.Overlays.Music
|
||||
this.FadeOut(transition_duration);
|
||||
}
|
||||
|
||||
private void itemSelected(ILive<BeatmapSetInfo> beatmapSet)
|
||||
private void itemSelected(Live<BeatmapSetInfo> beatmapSet)
|
||||
{
|
||||
beatmapSet.PerformRead(set =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user