Refactor DialogOverlay logic to avoid dismissal potentially being unhandled

This commit is contained in:
Dean Herbert
2021-05-19 16:52:34 +09:00
parent 44e22b31a9
commit fc5987bf69
2 changed files with 10 additions and 3 deletions

View File

@ -95,6 +95,8 @@ namespace osu.Game.Overlays.Dialog
}
}
protected override bool StartHidden => true;
protected PopupDialog()
{
RelativeSizeAxes = Axes.Both;
@ -205,6 +207,10 @@ namespace osu.Game.Overlays.Dialog
},
},
};
// It's important we start in a visible state so our state fires on hide, even before load.
// This is used by the DialogOverlay to know when the dialog was dismissed.
Show();
}
/// <summary>