mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 22:33:05 +08:00
Consume updated logic at MainMenu
This commit is contained in:
parent
124ac689b8
commit
b83322281e
@ -1,9 +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.
|
||||
|
||||
using System.Linq;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
@ -22,6 +19,8 @@ using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osu.Game.Screens.Select;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
@ -120,7 +119,7 @@ namespace osu.Game.Screens.Menu
|
||||
Origin = Anchor.TopRight,
|
||||
Margin = new MarginPadding { Right = 15, Top = 5 }
|
||||
},
|
||||
exitConfirmOverlay?.CreateProxy() ?? Drawable.Empty()
|
||||
exitConfirmOverlay?.CreateProxy() ?? Empty()
|
||||
});
|
||||
|
||||
buttons.StateChanged += state =>
|
||||
@ -270,16 +269,12 @@ namespace osu.Game.Screens.Menu
|
||||
if (!exitConfirmed && dialogOverlay != null)
|
||||
{
|
||||
if (dialogOverlay.CurrentDialog is ConfirmExitDialog exitDialog)
|
||||
{
|
||||
exitConfirmed = true;
|
||||
exitDialog.Buttons.First().Click();
|
||||
}
|
||||
exitDialog.PerformOkAction();
|
||||
else
|
||||
{
|
||||
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
buttons.State = ButtonSystemState.Exit;
|
||||
OverlayActivationMode.Value = OverlayActivation.Disabled;
|
||||
|
Loading…
Reference in New Issue
Block a user