mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Ensure track is stopped on player completion
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
@ -13,6 +15,9 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -29,5 +34,11 @@ namespace osu.Game.Screens.Edit
|
||||
}
|
||||
|
||||
protected override bool CheckModsAllowFailure() => false; // never fail.
|
||||
|
||||
public override bool OnExiting(IScreen next)
|
||||
{
|
||||
musicController.Stop();
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user