mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 07:23:14 +08:00
Rename Stop to StopAnyPlaying for clarity
This commit is contained in:
parent
4b2b1f51f9
commit
73e13e2d63
@ -65,7 +65,7 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
AddStep("get track", () => track = getOwnedTrack());
|
||||
AddStep("start", () => track.Start());
|
||||
AddStep("stop by owner", () => trackManager.Stop(this));
|
||||
AddStep("stop by owner", () => trackManager.StopAnyPlaying(this));
|
||||
AddAssert("stopped", () => !track.IsRunning);
|
||||
}
|
||||
|
||||
@ -77,9 +77,9 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
AddStep("get track", () => AddInternal(owner = new TestTrackOwner(track = getTrack())));
|
||||
AddStep("start", () => track.Start());
|
||||
AddStep("attempt stop", () => trackManager.Stop(this));
|
||||
AddStep("attempt stop", () => trackManager.StopAnyPlaying(this));
|
||||
AddAssert("not stopped", () => track.IsRunning);
|
||||
AddStep("stop by true owner", () => trackManager.Stop(owner));
|
||||
AddStep("stop by true owner", () => trackManager.StopAnyPlaying(owner));
|
||||
AddAssert("stopped", () => !track.IsRunning);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Audio
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops the currently playing <see cref="PreviewTrack"/>.
|
||||
/// Stops any currently playing <see cref="PreviewTrack"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Only the immediate owner (an object that implements <see cref="IPreviewTrackOwner"/>) of the playing <see cref="PreviewTrack"/>
|
||||
@ -68,12 +68,12 @@ namespace osu.Game.Audio
|
||||
/// can always stop the <see cref="PreviewTrack"/> themselves through <see cref="PreviewTrack.Stop()"/>.
|
||||
/// </remarks>
|
||||
/// <param name="source">The <see cref="IPreviewTrackOwner"/> which may be the owner of the <see cref="PreviewTrack"/>.</param>
|
||||
public void Stop(IPreviewTrackOwner source)
|
||||
public void StopAnyPlaying(IPreviewTrackOwner source)
|
||||
{
|
||||
if (current?.Owner != source)
|
||||
if (current == null || current.Owner != source)
|
||||
return;
|
||||
|
||||
current?.Stop();
|
||||
current.Stop();
|
||||
current = null;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace osu.Game.Graphics.Containers
|
||||
protected override void PopOut()
|
||||
{
|
||||
base.PopOut();
|
||||
previewTrackManager.Stop(this);
|
||||
previewTrackManager.StopAnyPlaying(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
if (Header.Tabs.Current.Value == DirectTab.Search && (Filter.Search.Text == string.Empty || currentQuery == string.Empty)) return;
|
||||
|
||||
previewTrackManager.Stop(this);
|
||||
previewTrackManager.StopAnyPlaying(this);
|
||||
|
||||
getSetsRequest = new SearchBeatmapSetsRequest(currentQuery.Value ?? string.Empty,
|
||||
((FilterControl)Filter).Ruleset.Value,
|
||||
|
Loading…
Reference in New Issue
Block a user