mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 03:07:26 +08:00
Merge pull request #1487 from smoogipoo/version-overlay-switch
Add startup argument to disable the version overlay
This commit is contained in:
commit
6300e182e2
@ -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,12 +82,15 @@ namespace osu.Desktop
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
if (!noVersionOverlay)
|
||||||
|
{
|
||||||
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
|
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
|
||||||
{
|
{
|
||||||
Add(v);
|
Add(v);
|
||||||
v.State = Visibility.Visible;
|
v.State = Visibility.Visible;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void SetHost(GameHost host)
|
public override void SetHost(GameHost host)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user