mirror of
https://github.com/ppy/osu
synced 2025-01-01 20:02:14 +00:00
Stop PreviewTrack on Completed event
This commit is contained in:
parent
974873f5b4
commit
befe57e12e
@ -28,6 +28,7 @@ namespace osu.Game.Audio
|
||||
private void load()
|
||||
{
|
||||
track = GetTrack();
|
||||
track.Completed += Stop;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -50,15 +51,6 @@ namespace osu.Game.Audio
|
||||
/// </summary>
|
||||
public bool IsRunning => track?.IsRunning ?? false;
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// Todo: Track currently doesn't signal its completion, so we have to handle it manually
|
||||
if (hasStarted && track.HasCompleted)
|
||||
Stop();
|
||||
}
|
||||
|
||||
private ScheduledDelegate startDelegate;
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user