From 941e8525af5c1b26b5aadc6ffd52554b53f2cf4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 31 Oct 2020 16:06:53 +0100 Subject: [PATCH] Add flag parameter to allow non-user-pause via music controller --- osu.Game/Overlays/MusicController.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 12caf98021..7e7be31de6 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -182,9 +182,14 @@ namespace osu.Game.Overlays /// /// Stop playing the current track and pause at the current position. /// - public void Stop() + /// + /// Whether the request to stop was issued by the user rather than internally. + /// Specifying true will ensure that other methods like + /// will not resume music playback until the next explicit call to . + /// + public void Stop(bool requestedByUser = true) { - IsUserPaused = true; + IsUserPaused |= requestedByUser; if (CurrentTrack.IsRunning) CurrentTrack.Stop(); }