Show a notification instead of blocking exit of wizard

This commit is contained in:
Dean Herbert
2022-04-18 19:35:51 +09:00
parent 8bfa59d12f
commit 9074eb283d
2 changed files with 14 additions and 13 deletions

View File

@ -222,13 +222,6 @@ namespace osu.Game.Overlays
performer.PerformFromScreen(_ => { Show(); }, new[] { typeof(MainMenu) });
}
protected override bool OnClick(ClickEvent e)
{
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to exit the setup process?", Hide, () => { }));
return base.OnClick(e);
}
protected override void PopIn()
{
base.PopIn();
@ -283,6 +276,20 @@ namespace osu.Game.Overlays
protected override void PopOut()
{
if (currentStepIndex != null)
{
notificationOverlay?.Post(new SimpleNotification
{
Text = "Click here to resume initial setup at any point",
Icon = FontAwesome.Solid.Horse,
Activated = () =>
{
Show();
return true;
},
});
}
base.PopOut();
this.FadeOut(100);
}