Rename for better understanding

ShowOverlays -> AllowOverlays
ShowOverlaysOnEnter -> HideOverlaysOnEnter
This commit is contained in:
Aergwyn
2018-05-21 09:42:29 +02:00
parent 9f0cc7683b
commit 1482bca147
12 changed files with 40 additions and 39 deletions

View File

@ -16,18 +16,18 @@ namespace osu.Game.Graphics.Containers
private SampleChannel samplePopIn;
private SampleChannel samplePopOut;
protected BindableBool ShowOverlays = new BindableBool(true);
protected BindableBool AllowOverlays = new BindableBool(true);
[BackgroundDependencyLoader(true)]
private void load(OsuGame osuGame, AudioManager audio)
{
if (osuGame != null)
AllowOverlays.BindTo(osuGame.AllowOverlays);
samplePopIn = audio.Sample.Get(@"UI/overlay-pop-in");
samplePopOut = audio.Sample.Get(@"UI/overlay-pop-out");
StateChanged += onStateChanged;
if (osuGame != null)
ShowOverlays.BindTo(osuGame.ShowOverlays);
}
/// <summary>
@ -52,21 +52,20 @@ namespace osu.Game.Graphics.Containers
private void onStateChanged(Visibility visibility)
{
if (!ShowOverlays)
if (AllowOverlays)
{
switch (visibility)
{
case Visibility.Visible:
samplePopIn?.Play();
break;
case Visibility.Hidden:
samplePopOut?.Play();
break;
}
}
else
State = Visibility.Hidden;
return;
}
switch (visibility)
{
case Visibility.Visible:
samplePopIn?.Play();
break;
case Visibility.Hidden:
samplePopOut?.Play();
break;
}
}
}
}