Allow overriding of Overlay pop-in and pop-out samples

This commit is contained in:
Jamie Taylor 2021-01-15 14:53:29 +09:00
parent d91e17542a
commit 806324b196

View File

@ -20,6 +20,8 @@ namespace osu.Game.Graphics.Containers
{
private SampleChannel samplePopIn;
private SampleChannel samplePopOut;
protected virtual string PopInSampleName => "UI/overlay-pop-in";
protected virtual string PopOutSampleName => "UI/overlay-pop-out";
protected override bool BlockNonPositionalInput => true;
@ -40,8 +42,8 @@ namespace osu.Game.Graphics.Containers
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio)
{
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
samplePopIn = audio.Samples.Get(PopInSampleName);
samplePopOut = audio.Samples.Get(PopOutSampleName);
}
protected override void LoadComplete()