mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:23:22 +08:00
Drank some coffee and figured out the fix
This commit is contained in:
parent
b0f1a69523
commit
edc6314634
@ -28,7 +28,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private SkinnableSound pauseLoop;
|
private SkinnableSound pauseLoop;
|
||||||
|
|
||||||
public void FlushPendingSkinChanges() => pauseLoop.FlushPendingSkinChanges();
|
|
||||||
protected override Action BackAction => () => InternalButtons.First().TriggerClick();
|
protected override Action BackAction => () => InternalButtons.First().TriggerClick();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -316,11 +316,6 @@ namespace osu.Game.Screens.Play
|
|||||||
// we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there.
|
// we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there.
|
||||||
failAnimationLayer.Add(createOverlayComponents(Beatmap.Value));
|
failAnimationLayer.Add(createOverlayComponents(Beatmap.Value));
|
||||||
|
|
||||||
rulesetSkinProvider.SourceChanged += () =>
|
|
||||||
{
|
|
||||||
PauseOverlay.FlushPendingSkinChanges();
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!DrawableRuleset.AllowGameplayOverlays)
|
if (!DrawableRuleset.AllowGameplayOverlays)
|
||||||
{
|
{
|
||||||
HUDOverlay.ShowHud.Value = false;
|
HUDOverlay.ShowHud.Value = false;
|
||||||
|
@ -132,6 +132,8 @@ namespace osu.Game.Skinning
|
|||||||
if (Sample == null)
|
if (Sample == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
FlushPendingSkinChanges();
|
||||||
|
|
||||||
activeChannel = Sample.GetChannel();
|
activeChannel = Sample.GetChannel();
|
||||||
activeChannel.Looping = Looping;
|
activeChannel.Looping = Looping;
|
||||||
activeChannel.Play();
|
activeChannel.Play();
|
||||||
|
@ -27,6 +27,15 @@ namespace osu.Game.Skinning
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected ISkinSource CurrentSkin { get; private set; } = null!;
|
protected ISkinSource CurrentSkin { get; private set; } = null!;
|
||||||
|
|
||||||
|
protected void FlushPendingSkinChanges()
|
||||||
|
{
|
||||||
|
if (pendingSkinChange == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pendingSkinChange.RunTask();
|
||||||
|
pendingSkinChange = null;
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ISkinSource source)
|
private void load(ISkinSource source)
|
||||||
{
|
{
|
||||||
@ -42,15 +51,6 @@ namespace osu.Game.Skinning
|
|||||||
pendingSkinChange = Scheduler.Add(skinChanged);
|
pendingSkinChange = Scheduler.Add(skinChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void FlushPendingSkinChanges()
|
|
||||||
{
|
|
||||||
if (pendingSkinChange == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pendingSkinChange.RunTask();
|
|
||||||
pendingSkinChange = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadAsyncComplete()
|
protected override void LoadAsyncComplete()
|
||||||
{
|
{
|
||||||
base.LoadAsyncComplete();
|
base.LoadAsyncComplete();
|
||||||
@ -61,6 +61,8 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
SkinChanged(CurrentSkin);
|
SkinChanged(CurrentSkin);
|
||||||
OnSkinChanged?.Invoke();
|
OnSkinChanged?.Invoke();
|
||||||
|
|
||||||
|
pendingSkinChange = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -110,13 +110,6 @@ namespace osu.Game.Skinning
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void FlushPendingSkinChanges()
|
|
||||||
{
|
|
||||||
base.FlushPendingSkinChanges();
|
|
||||||
|
|
||||||
samplesContainer.ForEach(c => c.FlushPendingSkinChanges());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Plays the samples.
|
/// Plays the samples.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user