PreviewTrack.Owner

This commit is contained in:
Roman Kapustin
2018-06-01 21:06:37 +03:00
parent 572c3f5189
commit 88ac427ba6
5 changed files with 26 additions and 6 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Audio;
using osu.Framework.Audio.Track;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps;
@ -45,11 +46,12 @@ namespace osu.Game.Audio
};
}
public PreviewTrack Get(BeatmapSetInfo beatmapSetInfo) =>
public PreviewTrack Get(BeatmapSetInfo beatmapSetInfo, OverlayContainer previewOwner) =>
new PreviewTrack(
trackManager.Get($"https://b.ppy.sh/preview/{beatmapSetInfo?.OnlineBeatmapSetID}.mp3"),
onTrackStart,
onTrackStop);
onTrackStop,
previewOwner);
protected override void Update()
{