mirror of https://github.com/ppy/osu
Fix potential of toggle between load and LoadComplete
This commit is contained in:
parent
039b5ec958
commit
be66c0e912
|
@ -41,6 +41,12 @@ public abstract class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPre
|
|||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
|
||||
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
OverlayActivationMode.ValueChanged += mode =>
|
||||
{
|
||||
|
@ -51,8 +57,7 @@ private void load(AudioManager audio)
|
|||
if (game != null)
|
||||
OverlayActivationMode.BindTo(game.OverlayActivationMode);
|
||||
|
||||
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
|
||||
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
|
||||
base.LoadComplete();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue