Rename ExitConfirmOverlay to be more explicit about purpose

This commit is contained in:
Dean Herbert 2023-06-23 14:46:38 +09:00
parent 11a97e1bb8
commit 6df617d536
3 changed files with 8 additions and 10 deletions

View File

@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Alpha = 0,
};
var overlay = new TestHoldToConfirmOverlay
var overlay = new TestHoldToExitGameOverlay
{
Action = () =>
{
@ -59,7 +59,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddUntilStep("wait until fired again", () => overlay.Fired);
}
private partial class TestHoldToConfirmOverlay : ExitConfirmOverlay
private partial class TestHoldToExitGameOverlay : HoldToExitGameOverlay
{
public void Begin() => BeginConfirm();
}

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Input.Bindings;
@ -10,13 +8,13 @@ using osu.Game.Overlays;
namespace osu.Game.Screens.Menu
{
public partial class ExitConfirmOverlay : HoldToConfirmOverlay, IKeyBindingHandler<GlobalAction>
public partial class HoldToExitGameOverlay : HoldToConfirmOverlay, IKeyBindingHandler<GlobalAction>
{
protected override bool AllowMultipleFires => true;
public void Abort() => AbortConfirm();
public ExitConfirmOverlay()
public HoldToExitGameOverlay()
: base(0.7f)
{
}

View File

@ -75,7 +75,7 @@ namespace osu.Game.Screens.Menu
private Bindable<double> holdDelay;
private Bindable<bool> loginDisplayed;
private ExitConfirmOverlay exitConfirmOverlay;
private HoldToExitGameOverlay holdToExitGameOverlay;
private bool exitConfirmedViaDialog;
private bool exitConfirmedViaHoldOrClick;
@ -91,7 +91,7 @@ namespace osu.Game.Screens.Menu
if (host.CanExit)
{
AddInternal(exitConfirmOverlay = new ExitConfirmOverlay
AddInternal(holdToExitGameOverlay = new HoldToExitGameOverlay
{
Action = () =>
{
@ -133,7 +133,7 @@ namespace osu.Game.Screens.Menu
Origin = Anchor.TopRight,
Margin = new MarginPadding { Right = 15, Top = 5 }
},
exitConfirmOverlay?.CreateProxy() ?? Empty()
holdToExitGameOverlay?.CreateProxy() ?? Empty()
});
Buttons.StateChanged += state =>
@ -305,7 +305,7 @@ namespace osu.Game.Screens.Menu
this.Exit();
}, () =>
{
exitConfirmOverlay.Abort();
holdToExitGameOverlay.Abort();
}));
}