Change default value and range of BoxElement's corner radius to match other usages

This commit is contained in:
Dean Herbert 2023-11-15 10:45:01 +09:00
parent 74fb1b5f81
commit 2264e1e249
No known key found for this signature in database
2 changed files with 8 additions and 5 deletions

View File

@ -216,7 +216,10 @@ namespace osu.Game.Skinning
}, },
new ArgonScoreCounter(), new ArgonScoreCounter(),
new ArgonHealthDisplay(), new ArgonHealthDisplay(),
new BoxElement(), new BoxElement
{
CornerRadius = { Value = 0.5f }
},
new ArgonAccuracyCounter(), new ArgonAccuracyCounter(),
new ArgonComboCounter new ArgonComboCounter
{ {

View File

@ -20,11 +20,11 @@ namespace osu.Game.Skinning.Components
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.CornerRadius), nameof(SkinnableComponentStrings.CornerRadiusDescription), [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.CornerRadius), nameof(SkinnableComponentStrings.CornerRadiusDescription),
SettingControlType = typeof(SettingsPercentageSlider<float>))] SettingControlType = typeof(SettingsPercentageSlider<float>))]
public new BindableFloat CornerRadius { get; } = new BindableFloat(1) public new BindableFloat CornerRadius { get; } = new BindableFloat(0.25f)
{ {
Precision = 0.01f,
MinValue = 0, MinValue = 0,
MaxValue = 1, MaxValue = 0.5f,
Precision = 0.01f
}; };
public BoxElement() public BoxElement()
@ -47,7 +47,7 @@ namespace osu.Game.Skinning.Components
{ {
base.Update(); base.Update();
base.CornerRadius = CornerRadius.Value * Math.Min(DrawWidth, DrawHeight) * 0.5f; base.CornerRadius = CornerRadius.Value * Math.Min(DrawWidth, DrawHeight);
} }
} }
} }