1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-24 09:37:19 +08:00

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