mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 23:23:18 +08:00
Fix incorrect event order.
This commit is contained in:
parent
68857b573d
commit
963117f07d
@ -20,15 +20,14 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
if (dialog == currentDialog) return;
|
if (dialog == currentDialog) return;
|
||||||
|
|
||||||
State = Visibility.Visible;
|
|
||||||
|
|
||||||
dialogContainer.Add(dialog);
|
|
||||||
|
|
||||||
dialog.Show();
|
|
||||||
dialog.StateChanged += onDialogOnStateChanged;
|
|
||||||
|
|
||||||
currentDialog?.Hide();
|
currentDialog?.Hide();
|
||||||
currentDialog = dialog;
|
currentDialog = dialog;
|
||||||
|
|
||||||
|
dialogContainer.Add(currentDialog);
|
||||||
|
|
||||||
|
currentDialog.Show();
|
||||||
|
currentDialog.StateChanged += onDialogOnStateChanged;
|
||||||
|
State = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDialogOnStateChanged(OverlayContainer dialog, Visibility v)
|
private void onDialogOnStateChanged(OverlayContainer dialog, Visibility v)
|
||||||
@ -38,6 +37,7 @@ namespace osu.Game.Overlays
|
|||||||
//handle the dialog being dismissed.
|
//handle the dialog being dismissed.
|
||||||
dialog.Delay(PopupDialog.EXIT_DURATION);
|
dialog.Delay(PopupDialog.EXIT_DURATION);
|
||||||
dialog.Expire();
|
dialog.Expire();
|
||||||
|
|
||||||
if (dialog == currentDialog)
|
if (dialog == currentDialog)
|
||||||
State = Visibility.Hidden;
|
State = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user