1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-10 06:52:54 +08:00

Add startup argument to disable the version overlay

This commit is contained in:
smoogipoo 2017-11-11 22:53:50 +09:00
parent 9a8d9aa781
commit 3d6bb3befe

View File

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