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