Block overlays to prevent getting into a bad state.

This commit is contained in:
Lucas A 2021-05-17 13:28:59 +02:00
parent a38fc1a2e0
commit 5ca4fd5ab4

View File

@ -13,6 +13,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{ {
private readonly TaskCompletionSource<string> taskCompletionSource; private readonly TaskCompletionSource<string> taskCompletionSource;
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
protected override bool IsValidDirectory(DirectoryInfo info) => info?.GetFiles("osu!.*.cfg").Any() ?? false; protected override bool IsValidDirectory(DirectoryInfo info) => info?.GetFiles("osu!.*.cfg").Any() ?? false;
public override LocalisableString HeaderText => "Please select your osu!stable install location"; public override LocalisableString HeaderText => "Please select your osu!stable install location";
@ -28,10 +30,10 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
this.Exit(); this.Exit();
} }
public override bool OnBackButton() public override bool OnExiting(IScreen next)
{ {
taskCompletionSource.TrySetCanceled(); taskCompletionSource.TrySetCanceled();
return base.OnBackButton(); return base.OnExiting(next);
} }
} }
} }