mirror of
https://github.com/osukey/osukey.git
synced 2025-06-10 13:58:01 +09:00
Remove intermediate container
This commit is contained in:
parent
0f7fde5d2c
commit
fe8c462498
@ -65,20 +65,12 @@ namespace osu.Game.Overlays
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private OnScreenDisplay onScreenDisplay { get; set; }
|
private OnScreenDisplay onScreenDisplay { get; set; }
|
||||||
|
|
||||||
[NotNull]
|
|
||||||
private readonly TrackContainer trackContainer;
|
|
||||||
|
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
public DrawableTrack CurrentTrack { get; private set; }
|
public DrawableTrack CurrentTrack { get; private set; }
|
||||||
|
|
||||||
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
|
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
|
||||||
private IBindable<WeakReference<BeatmapSetInfo>> managerRemoved;
|
private IBindable<WeakReference<BeatmapSetInfo>> managerRemoved;
|
||||||
|
|
||||||
public MusicController()
|
|
||||||
{
|
|
||||||
InternalChild = trackContainer = new TrackContainer { RelativeSizeAxes = Axes.Both };
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
@ -337,8 +329,10 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (current != null)
|
if (current != null)
|
||||||
{
|
{
|
||||||
trackContainer.Add(CurrentTrack = new DrawableTrack(current.GetRealTrack()));
|
CurrentTrack = new DrawableTrack(current.GetRealTrack());
|
||||||
CurrentTrack.Completed += () => onTrackCompleted(current);
|
CurrentTrack.Completed += () => onTrackCompleted(current);
|
||||||
|
|
||||||
|
AddInternal(CurrentTrack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,10 +427,6 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TrackContainer : AudioContainer<DrawableTrack>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum TrackChangeDirection
|
public enum TrackChangeDirection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user