mirror of
https://github.com/osukey/osukey.git
synced 2025-05-01 19:57:25 +09:00
Rename for better understanding
ShowOverlays -> AllowOverlays ShowOverlaysOnEnter -> HideOverlaysOnEnter
This commit is contained in:
parent
9f0cc7683b
commit
1482bca147
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ namespace osu.Game
|
||||
|
||||
public float ToolbarOffset => Toolbar.Position.Y + Toolbar.DrawHeight;
|
||||
|
||||
public readonly BindableBool ShowOverlays = new BindableBool();
|
||||
public readonly BindableBool AllowOverlays = new BindableBool();
|
||||
|
||||
private OsuScreen screenStack;
|
||||
|
||||
@ -367,9 +367,9 @@ namespace osu.Game
|
||||
settings.StateChanged += _ => updateScreenOffset();
|
||||
notifications.StateChanged += _ => updateScreenOffset();
|
||||
|
||||
notifications.Enabled.BindTo(ShowOverlays);
|
||||
notifications.Enabled.BindTo(AllowOverlays);
|
||||
|
||||
ShowOverlays.ValueChanged += show =>
|
||||
AllowOverlays.ValueChanged += show =>
|
||||
{
|
||||
//central game screen change logic.
|
||||
if (!show)
|
||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||
|
||||
public override bool ShowOverlaysOnEnter => false;
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
public override bool AllowBeatmapRulesetChange => false;
|
||||
|
||||
private Box bottomBackground;
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens
|
||||
{
|
||||
private bool showDisclaimer;
|
||||
|
||||
public override bool ShowOverlaysOnEnter => false;
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
|
||||
protected override bool AllowBackButton => false;
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public event Action<MenuState> StateChanged;
|
||||
|
||||
private readonly BindableBool showOverlays = new BindableBool();
|
||||
private readonly BindableBool allowOverlays = new BindableBool();
|
||||
|
||||
public Action OnEdit;
|
||||
public Action OnExit;
|
||||
@ -135,7 +135,9 @@ namespace osu.Game.Screens.Menu
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(AudioManager audio, OsuGame game)
|
||||
{
|
||||
if (game != null) showOverlays.BindTo(game.ShowOverlays);
|
||||
if (game != null)
|
||||
allowOverlays.BindTo(game.AllowOverlays);
|
||||
|
||||
sampleBack = audio.Sample.Get(@"Menu/button-back-select");
|
||||
}
|
||||
|
||||
@ -322,7 +324,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
logoDelayedAction = Scheduler.AddDelayed(() =>
|
||||
{
|
||||
showOverlays.Value = false;
|
||||
allowOverlays.Value = false;
|
||||
|
||||
logo.ClearTransforms(targetMember: nameof(Position));
|
||||
logo.RelativePositionAxes = Axes.Both;
|
||||
@ -351,7 +353,7 @@ namespace osu.Game.Screens.Menu
|
||||
logoTracking = true;
|
||||
|
||||
logo.Impact();
|
||||
showOverlays.Value = true;
|
||||
allowOverlays.Value = true;
|
||||
}, 200);
|
||||
break;
|
||||
default:
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Screens.Menu
|
||||
private readonly SpriteIcon icon;
|
||||
private Color4 iconColour;
|
||||
|
||||
public override bool ShowOverlaysOnEnter => false;
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
public override bool CursorVisible => false;
|
||||
|
||||
public Disclaimer()
|
||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Screens.Menu
|
||||
private SampleChannel welcome;
|
||||
private SampleChannel seeya;
|
||||
|
||||
public override bool ShowOverlaysOnEnter => false;
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
public override bool CursorVisible => false;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenEmpty();
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
private readonly ButtonSystem buttons;
|
||||
|
||||
public override bool ShowOverlaysOnEnter => buttons.State != MenuState.Initial;
|
||||
public override bool HideOverlaysOnEnter => buttons.State == MenuState.Initial;
|
||||
|
||||
protected override bool AllowBackButton => buttons.State != MenuState.Initial;
|
||||
|
||||
|
@ -32,12 +32,12 @@ namespace osu.Game.Screens
|
||||
/// </summary>
|
||||
protected virtual BackgroundScreen CreateBackground() => null;
|
||||
|
||||
protected BindableBool ShowOverlays = new BindableBool();
|
||||
protected BindableBool AllowOverlays = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// Whether overlays should be shown when this screen is entered or resumed.
|
||||
/// Whether overlays should be hidden when this screen is entered or resumed.
|
||||
/// </summary>
|
||||
public virtual bool ShowOverlaysOnEnter => true;
|
||||
public virtual bool HideOverlaysOnEnter => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this <see cref="OsuScreen"/> allows the cursor to be displayed.
|
||||
@ -88,7 +88,7 @@ namespace osu.Game.Screens
|
||||
if (osuGame != null)
|
||||
{
|
||||
Ruleset.BindTo(osuGame.Ruleset);
|
||||
ShowOverlays.BindTo(osuGame.ShowOverlays);
|
||||
AllowOverlays.BindTo(osuGame.AllowOverlays);
|
||||
}
|
||||
|
||||
sampleExit = audio.Sample.Get(@"UI/screen-back");
|
||||
@ -220,7 +220,7 @@ namespace osu.Game.Screens
|
||||
if (backgroundParallaxContainer != null)
|
||||
backgroundParallaxContainer.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * BackgroundParallaxAmount;
|
||||
|
||||
ShowOverlays.Value = ShowOverlaysOnEnter;
|
||||
AllowOverlays.Value = !HideOverlaysOnEnter;
|
||||
}
|
||||
|
||||
private void onExitingLogo()
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
protected override float BackgroundParallaxAmount => 0.1f;
|
||||
|
||||
public override bool ShowOverlaysOnEnter => false;
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
|
||||
public Action RestartRequested;
|
||||
|
||||
|
@ -25,8 +25,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private BeatmapMetadataDisplay info;
|
||||
|
||||
private bool showOverlays = true;
|
||||
public override bool ShowOverlaysOnEnter => showOverlays;
|
||||
private bool allowOverlays = true;
|
||||
public override bool HideOverlaysOnEnter => !allowOverlays;
|
||||
|
||||
private Task loadTask;
|
||||
|
||||
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
player.RestartRequested = () =>
|
||||
{
|
||||
showOverlays = false;
|
||||
allowOverlays = false;
|
||||
ValidForResume = true;
|
||||
};
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Tournament
|
||||
{
|
||||
private const string results_filename = "drawings_results.txt";
|
||||
|
||||
public override bool ShowOverlaysOnEnter => false;
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user