mirror of https://github.com/ppy/osu
fix VisualTests and Samples still playing
This commit is contained in:
parent
67db539172
commit
4d528c4e67
|
@ -16,9 +16,9 @@ public class OsuFocusedOverlayContainer : FocusedOverlayContainer
|
|||
private SampleChannel samplePopIn;
|
||||
private SampleChannel samplePopOut;
|
||||
|
||||
protected BindableBool ShowOverlays = new BindableBool();
|
||||
protected BindableBool ShowOverlays = new BindableBool(true);
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OsuGame osuGame, AudioManager audio)
|
||||
{
|
||||
samplePopIn = audio.Sample.Get(@"UI/overlay-pop-in");
|
||||
|
@ -26,7 +26,8 @@ private void load(OsuGame osuGame, AudioManager audio)
|
|||
|
||||
StateChanged += onStateChanged;
|
||||
|
||||
ShowOverlays.BindTo(osuGame.ShowOverlays);
|
||||
if (osuGame != null)
|
||||
ShowOverlays.BindTo(osuGame.ShowOverlays);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -52,7 +53,10 @@ protected override bool OnClick(InputState state)
|
|||
private void onStateChanged(Visibility visibility)
|
||||
{
|
||||
if (!ShowOverlays)
|
||||
{
|
||||
State = Visibility.Hidden;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (visibility)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue