mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Fix other weirdness in variable and description naming
This commit is contained in:
@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddSliderStep("Manual spacing test", 0, 10, 2, spacing =>
|
AddSliderStep("Manual spacing test", 0, 10, 2, spacing =>
|
||||||
{
|
{
|
||||||
if (colourHitErrorMeter.IsNotNull())
|
if (colourHitErrorMeter.IsNotNull())
|
||||||
colourHitErrorMeter.HitShapeSpacing.Value = spacing;
|
colourHitErrorMeter.JudgementSpacing.Value = spacing;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
public void TestSpacingChange()
|
public void TestSpacingChange()
|
||||||
{
|
{
|
||||||
AddRepeatStep("Add judgement", applyOneJudgement, 5);
|
AddRepeatStep("Add judgement", applyOneJudgement, 5);
|
||||||
AddStep("Change spacing", () => colourHitErrorMeter.HitShapeSpacing.Value = 10);
|
AddStep("Change spacing", () => colourHitErrorMeter.JudgementSpacing.Value = 10);
|
||||||
AddRepeatStep("Add judgement", applyOneJudgement, 5);
|
AddRepeatStep("Add judgement", applyOneJudgement, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
public void TestHitErrorShapeChange()
|
public void TestHitErrorShapeChange()
|
||||||
{
|
{
|
||||||
AddRepeatStep("Add judgement", applyOneJudgement, 8);
|
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);
|
AddRepeatStep("Add judgement", applyOneJudgement, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
private const int animation_duration = 200;
|
private const int animation_duration = 200;
|
||||||
private const int drawable_judgement_size = 8;
|
private const int drawable_judgement_size = 8;
|
||||||
|
|
||||||
[SettingSource("Judgement count", "Number of displayed judgements")]
|
[SettingSource("Judgement count", "The number of displayed judgements")]
|
||||||
public BindableNumber<int> JudgementCount { get; } = new BindableNumber<int>(20)
|
public BindableNumber<int> JudgementCount { get; } = new BindableNumber<int>(20)
|
||||||
{
|
{
|
||||||
MinValue = 1,
|
MinValue = 1,
|
||||||
@ -28,23 +28,26 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
Precision = 1
|
Precision = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Spacing", "Space between each displayed judgement")]
|
[SettingSource("Judgement spacing", "The space between each displayed judgement")]
|
||||||
public BindableNumber<float> HitShapeSpacing { get; } = new BindableNumber<float>(2)
|
public BindableNumber<float> JudgementSpacing { get; } = new BindableNumber<float>(2)
|
||||||
{
|
{
|
||||||
MinValue = 0,
|
MinValue = 0,
|
||||||
MaxValue = 10,
|
MaxValue = 10,
|
||||||
Precision = 0.1f
|
Precision = 0.1f
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Shape", "The shape of each displayed judgement")]
|
[SettingSource("Judgement shape", "The shape of each displayed judgement")]
|
||||||
public Bindable<ShapeStyle> HitShape { get; } = new Bindable<ShapeStyle>();
|
public Bindable<ShapeStyle> JudgementShape { get; } = new Bindable<ShapeStyle>();
|
||||||
|
|
||||||
private readonly JudgementFlow judgementsFlow;
|
private readonly JudgementFlow judgementsFlow;
|
||||||
|
|
||||||
public ColourHitErrorMeter()
|
public ColourHitErrorMeter()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
InternalChild = judgementsFlow = new JudgementFlow();
|
InternalChild = judgementsFlow = new JudgementFlow
|
||||||
|
{
|
||||||
|
Shape = { BindTarget = JudgementShape }
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNewJudgement(JudgementResult judgement)
|
protected override void OnNewJudgement(JudgementResult judgement)
|
||||||
@ -58,18 +61,19 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
HitShapeSpacing.BindValueChanged(_ =>
|
|
||||||
|
JudgementSpacing.BindValueChanged(_ =>
|
||||||
{
|
{
|
||||||
judgementsFlow.Height = JudgementCount.Value * (drawable_judgement_size + HitShapeSpacing.Value) - HitShapeSpacing.Value;
|
judgementsFlow.Height = JudgementCount.Value * (drawable_judgement_size + JudgementSpacing.Value) - JudgementSpacing.Value;
|
||||||
judgementsFlow.Spacing = new Vector2(0, HitShapeSpacing.Value);
|
judgementsFlow.Spacing = new Vector2(0, JudgementSpacing.Value);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
JudgementCount.BindValueChanged(_ =>
|
JudgementCount.BindValueChanged(_ =>
|
||||||
{
|
{
|
||||||
//Used to clear out the overflowing judgement children when the value is lowered
|
//Used to clear out the overflowing judgement children when the value is lowered
|
||||||
judgementsFlow.RemoveAll(_ => true, true);
|
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);
|
}, true);
|
||||||
HitShape.BindValueChanged(_ => judgementsFlow.Shape.Value = HitShape.Value, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Clear() => judgementsFlow.Clear();
|
public override void Clear() => judgementsFlow.Clear();
|
||||||
|
Reference in New Issue
Block a user