1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Mark OnScreenDisplay dependency as nullable

This commit is contained in:
Salman Ahmed 2022-05-03 11:15:28 +03:00
parent b8287f3687
commit 0dd2e1652c

View File

@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Edit
private ExpandableSlider<double, SizeSlider<double>> distanceSpacingSlider;
private bool distanceSpacingScrollActive;
[Resolved]
[Resolved(canBeNull: true)]
private OnScreenDisplay onScreenDisplay { get; set; }
protected DistancedHitObjectComposer(Ruleset ruleset)
@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Edit
distanceSpacingSlider.ExpandedLabelText = $"Distance Spacing ({v.NewValue:0.##x})";
if (v.NewValue != v.OldValue)
onScreenDisplay.Display(new DistanceSpacingToast(v.NewValue.ToLocalisableString(@"0.##x")));
onScreenDisplay?.Display(new DistanceSpacingToast(v.NewValue.ToLocalisableString(@"0.##x")));
EditorBeatmap.BeatmapInfo.DistanceSpacing = v.NewValue;
}, true);