1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Merge pull request #7596 from peppy/fix-main-menu-input-regression

Fix regressed input handling order
This commit is contained in:
Dean Herbert 2020-01-24 17:32:55 +09:00 committed by GitHub
commit 56f74e6123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,21 @@ namespace osu.Game.Screens.Menu
holdDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
AddRangeInternal(new Drawable[]
if (host.CanExit)
{
AddInternal(exitConfirmOverlay = new ExitConfirmOverlay
{
Action = () =>
{
if (holdDelay.Value > 0)
confirmAndExit();
else
this.Exit();
}
});
}
AddRangeInternal(new[]
{
buttonsContainer = new ParallaxContainer
{
@ -101,23 +115,10 @@ namespace osu.Game.Screens.Menu
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Margin = new MarginPadding { Right = 15, Top = 5 }
}
},
exitConfirmOverlay.CreateProxy()
});
if (host.CanExit)
{
AddInternal(exitConfirmOverlay = new ExitConfirmOverlay
{
Action = () =>
{
if (holdDelay.Value > 0)
confirmAndExit();
else
this.Exit();
}
});
}
buttons.StateChanged += state =>
{
switch (state)