mirror of
https://github.com/ppy/osu
synced 2025-02-03 11:51:54 +00:00
Move confirm dialog logic to OnExiting
This commit is contained in:
parent
00b4cf1829
commit
9bcd1e6922
@ -305,6 +305,17 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return base.OnBackButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool OnExiting(IScreen next)
|
||||||
|
{
|
||||||
|
if (client.Room == null)
|
||||||
|
{
|
||||||
|
// room has not been created yet; exit immediately.
|
||||||
|
return base.OnExiting(next);
|
||||||
|
}
|
||||||
|
|
||||||
if (!exitConfirmed && dialogOverlay != null)
|
if (!exitConfirmed && dialogOverlay != null)
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
|
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
|
||||||
@ -316,7 +327,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.OnBackButton();
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ModSettingChangeTracker modSettingChangeTracker;
|
private ModSettingChangeTracker modSettingChangeTracker;
|
||||||
|
Loading…
Reference in New Issue
Block a user