mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:43:21 +08:00
Fix dialog not closing after spamming OS window close
This commit is contained in:
parent
9bcd1e6922
commit
db86098062
@ -318,11 +318,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
if (!exitConfirmed && dialogOverlay != null)
|
if (!exitConfirmed && dialogOverlay != null)
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
|
if (dialogOverlay.CurrentDialog is ConfirmDialog confirmDialog)
|
||||||
|
confirmDialog.PerformOkAction();
|
||||||
|
else
|
||||||
{
|
{
|
||||||
exitConfirmed = true;
|
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
|
||||||
this.Exit();
|
{
|
||||||
}));
|
exitConfirmed = true;
|
||||||
|
this.Exit();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user