mirror of
https://github.com/ppy/osu
synced 2025-01-01 11:52:20 +00:00
Change default value and range of BoxElement
's corner radius to match other usages
This commit is contained in:
parent
74fb1b5f81
commit
2264e1e249
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user