mirror of
https://github.com/ppy/osu
synced 2025-02-21 04:57:11 +00:00
Rename ExitConfirmOverlay
to be more explicit about purpose
This commit is contained in:
parent
11a97e1bb8
commit
6df617d536
@ -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();
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
@ -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();
|
||||
}));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user