mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Rename Stop to StopAnyPlaying for clarity
This commit is contained in:
@ -65,7 +65,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
AddStep("get track", () => track = getOwnedTrack());
|
AddStep("get track", () => track = getOwnedTrack());
|
||||||
AddStep("start", () => track.Start());
|
AddStep("start", () => track.Start());
|
||||||
AddStep("stop by owner", () => trackManager.Stop(this));
|
AddStep("stop by owner", () => trackManager.StopAnyPlaying(this));
|
||||||
AddAssert("stopped", () => !track.IsRunning);
|
AddAssert("stopped", () => !track.IsRunning);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,9 +77,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
AddStep("get track", () => AddInternal(owner = new TestTrackOwner(track = getTrack())));
|
AddStep("get track", () => AddInternal(owner = new TestTrackOwner(track = getTrack())));
|
||||||
AddStep("start", () => track.Start());
|
AddStep("start", () => track.Start());
|
||||||
AddStep("attempt stop", () => trackManager.Stop(this));
|
AddStep("attempt stop", () => trackManager.StopAnyPlaying(this));
|
||||||
AddAssert("not stopped", () => track.IsRunning);
|
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);
|
AddAssert("stopped", () => !track.IsRunning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Audio
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops the currently playing <see cref="PreviewTrack"/>.
|
/// Stops any currently playing <see cref="PreviewTrack"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Only the immediate owner (an object that implements <see cref="IPreviewTrackOwner"/>) of the playing <see cref="PreviewTrack"/>
|
/// 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()"/>.
|
/// can always stop the <see cref="PreviewTrack"/> themselves through <see cref="PreviewTrack.Stop()"/>.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="source">The <see cref="IPreviewTrackOwner"/> which may be the owner of the <see cref="PreviewTrack"/>.</param>
|
/// <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;
|
return;
|
||||||
|
|
||||||
current?.Stop();
|
current.Stop();
|
||||||
current = null;
|
current = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.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;
|
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,
|
getSetsRequest = new SearchBeatmapSetsRequest(currentQuery.Value ?? string.Empty,
|
||||||
((FilterControl)Filter).Ruleset.Value,
|
((FilterControl)Filter).Ruleset.Value,
|
||||||
|
Reference in New Issue
Block a user