mirror of
https://github.com/osukey/osukey.git
synced 2025-06-18 01:37:57 +09:00
Explicitly handle null settings case + add annotations
This commit is contained in:
parent
b219c17115
commit
63ec36b3be
@ -13,6 +13,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
@ -86,10 +87,12 @@ namespace osu.Game.Rulesets.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OnScreenDisplay onScreenDisplay, SettingsStore settings)
|
private void load([CanBeNull] OnScreenDisplay onScreenDisplay, [CanBeNull] SettingsStore settings)
|
||||||
{
|
{
|
||||||
this.onScreenDisplay = onScreenDisplay;
|
this.onScreenDisplay = onScreenDisplay;
|
||||||
|
|
||||||
|
if (settings != null)
|
||||||
|
{
|
||||||
rulesetConfig = CreateConfig(Ruleset, settings);
|
rulesetConfig = CreateConfig(Ruleset, settings);
|
||||||
|
|
||||||
if (rulesetConfig != null)
|
if (rulesetConfig != null)
|
||||||
@ -98,6 +101,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
onScreenDisplay?.BeginTracking(this, rulesetConfig);
|
onScreenDisplay?.BeginTracking(this, rulesetConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user