diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneColourHitErrorMeter.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneColourHitErrorMeter.cs index 84be2c8eb9..fccbf092fc 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneColourHitErrorMeter.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneColourHitErrorMeter.cs @@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Gameplay AddSliderStep("Manual spacing test", 0, 10, 2, spacing => { if (colourHitErrorMeter.IsNotNull()) - colourHitErrorMeter.HitShapeSpacing.Value = spacing; + colourHitErrorMeter.JudgementSpacing.Value = spacing; }); } @@ -73,7 +73,7 @@ namespace osu.Game.Tests.Visual.Gameplay public void TestSpacingChange() { AddRepeatStep("Add judgement", applyOneJudgement, 5); - AddStep("Change spacing", () => colourHitErrorMeter.HitShapeSpacing.Value = 10); + AddStep("Change spacing", () => colourHitErrorMeter.JudgementSpacing.Value = 10); AddRepeatStep("Add judgement", applyOneJudgement, 5); } @@ -89,7 +89,7 @@ namespace osu.Game.Tests.Visual.Gameplay public void TestHitErrorShapeChange() { AddRepeatStep("Add judgement", applyOneJudgement, 8); - AddStep("Change shape square", () => colourHitErrorMeter.HitShape.Value = ColourHitErrorMeter.ShapeStyle.Square); + AddStep("Change shape square", () => colourHitErrorMeter.JudgementShape.Value = ColourHitErrorMeter.ShapeStyle.Square); AddRepeatStep("Add judgement", applyOneJudgement, 10); } diff --git a/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs b/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs index bed815b98e..48b6676020 100644 --- a/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs +++ b/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs @@ -20,7 +20,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters private const int animation_duration = 200; private const int drawable_judgement_size = 8; - [SettingSource("Judgement count", "Number of displayed judgements")] + [SettingSource("Judgement count", "The number of displayed judgements")] public BindableNumber JudgementCount { get; } = new BindableNumber(20) { MinValue = 1, @@ -28,23 +28,26 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters Precision = 1 }; - [SettingSource("Spacing", "Space between each displayed judgement")] - public BindableNumber HitShapeSpacing { get; } = new BindableNumber(2) + [SettingSource("Judgement spacing", "The space between each displayed judgement")] + public BindableNumber JudgementSpacing { get; } = new BindableNumber(2) { MinValue = 0, MaxValue = 10, Precision = 0.1f }; - [SettingSource("Shape", "The shape of each displayed judgement")] - public Bindable HitShape { get; } = new Bindable(); + [SettingSource("Judgement shape", "The shape of each displayed judgement")] + public Bindable JudgementShape { get; } = new Bindable(); private readonly JudgementFlow judgementsFlow; public ColourHitErrorMeter() { AutoSizeAxes = Axes.Both; - InternalChild = judgementsFlow = new JudgementFlow(); + InternalChild = judgementsFlow = new JudgementFlow + { + Shape = { BindTarget = JudgementShape } + }; } protected override void OnNewJudgement(JudgementResult judgement) @@ -58,18 +61,19 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters protected override void LoadComplete() { base.LoadComplete(); - HitShapeSpacing.BindValueChanged(_ => + + JudgementSpacing.BindValueChanged(_ => { - judgementsFlow.Height = JudgementCount.Value * (drawable_judgement_size + HitShapeSpacing.Value) - HitShapeSpacing.Value; - judgementsFlow.Spacing = new Vector2(0, HitShapeSpacing.Value); + judgementsFlow.Height = JudgementCount.Value * (drawable_judgement_size + JudgementSpacing.Value) - JudgementSpacing.Value; + judgementsFlow.Spacing = new Vector2(0, JudgementSpacing.Value); }, true); + JudgementCount.BindValueChanged(_ => { //Used to clear out the overflowing judgement children when the value is lowered judgementsFlow.RemoveAll(_ => true, true); - judgementsFlow.Height = JudgementCount.Value * (drawable_judgement_size + HitShapeSpacing.Value) - HitShapeSpacing.Value; + judgementsFlow.Height = JudgementCount.Value * (drawable_judgement_size + JudgementSpacing.Value) - JudgementSpacing.Value; }, true); - HitShape.BindValueChanged(_ => judgementsFlow.Shape.Value = HitShape.Value, true); } public override void Clear() => judgementsFlow.Clear();