mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Make KeysPerSecondCalculator
dependency in HUDOverlay
nullable
This commit is contained in:
@ -191,6 +191,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
public void Attach(KeysPerSecondCalculator calculator)
|
public void Attach(KeysPerSecondCalculator calculator)
|
||||||
{
|
{
|
||||||
|
if (calculator == null) return;
|
||||||
|
|
||||||
var listener = new ActionListener();
|
var listener = new ActionListener();
|
||||||
|
|
||||||
KeyBindingContainer.Add(listener);
|
KeyBindingContainer.Add(listener);
|
||||||
|
@ -50,7 +50,8 @@ namespace osu.Game.Screens.Play
|
|||||||
public readonly HoldForMenuButton HoldToQuit;
|
public readonly HoldForMenuButton HoldToQuit;
|
||||||
public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
|
public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
|
||||||
|
|
||||||
private KeysPerSecondCalculator keysPerSecondCalculator;
|
[Resolved(canBeNull: true)]
|
||||||
|
private KeysPerSecondCalculator keysPerSecondCalculator { get; set; }
|
||||||
|
|
||||||
public Bindable<bool> ShowHealthBar = new Bindable<bool>(true);
|
public Bindable<bool> ShowHealthBar = new Bindable<bool>(true);
|
||||||
|
|
||||||
@ -130,10 +131,8 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuConfigManager config, INotificationOverlay notificationOverlay, KeysPerSecondCalculator calculator)
|
private void load(OsuConfigManager config, INotificationOverlay notificationOverlay)
|
||||||
{
|
{
|
||||||
keysPerSecondCalculator = calculator;
|
|
||||||
|
|
||||||
if (drawableRuleset != null)
|
if (drawableRuleset != null)
|
||||||
{
|
{
|
||||||
BindDrawableRuleset(drawableRuleset);
|
BindDrawableRuleset(drawableRuleset);
|
||||||
|
Reference in New Issue
Block a user