1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Merge pull request #1487 from smoogipoo/version-overlay-switch

Add startup argument to disable the version overlay
This commit is contained in:
Dean Herbert 2017-11-11 23:26:58 +09:00 committed by GitHub
commit 6300e182e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,9 +18,12 @@ namespace osu.Desktop
{
internal class OsuGameDesktop : OsuGame
{
private readonly bool noVersionOverlay;
public OsuGameDesktop(string[] args = null)
: base(args)
{
noVersionOverlay = args?.Any(a => a == "--no-version-overlay") ?? false;
}
public override Storage GetStorageForStableInstall()
@ -79,11 +82,14 @@ namespace osu.Desktop
{
base.LoadComplete();
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
if (!noVersionOverlay)
{
Add(v);
v.State = Visibility.Visible;
});
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
{
Add(v);
v.State = Visibility.Visible;
});
}
}
public override void SetHost(GameHost host)