mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 07:43:00 +08:00
Consider SubScreenStack
s when allowing for exit confirmation sequence in PerformFromMenuRunner
This commit is contained in:
parent
f9d9e6aa61
commit
2bc4bb9e20
@ -125,6 +125,18 @@ namespace osu.Game
|
||||
/// <returns>Whether a dialog blocked interaction.</returns>
|
||||
private bool checkForDialog(IScreen current)
|
||||
{
|
||||
// An exit process may traverse multiple levels.
|
||||
// When checking for dismissing dialogs, let's also consider sub screens.
|
||||
while (current is IHasSubScreenStack currentWithSubScreenStack)
|
||||
{
|
||||
var nestedCurrent = currentWithSubScreenStack.SubScreenStack.CurrentScreen;
|
||||
|
||||
if (nestedCurrent == null)
|
||||
break;
|
||||
|
||||
current = nestedCurrent;
|
||||
}
|
||||
|
||||
var currentDialog = dialogOverlay.CurrentDialog;
|
||||
|
||||
if (lastEncounteredDialog != null)
|
||||
|
Loading…
Reference in New Issue
Block a user