1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-08 05:43:39 +08:00

Merge pull request #25458 from Joehuu/corner-radius-localisation

This commit is contained in:
Dean Herbert
2023-11-15 11:10:59 +09:00
committed by GitHub
Unverified
2 changed files with 12 additions and 6 deletions
+4 -1
View File
@@ -216,7 +216,10 @@ namespace osu.Game.Skinning
},
new ArgonScoreCounter(),
new ArgonHealthDisplay(),
new BoxElement(),
new BoxElement
{
CornerRadius = { Value = 0.5f }
},
new ArgonAccuracyCounter(),
new ArgonComboCounter
{
+8 -5
View File
@@ -7,6 +7,8 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Configuration;
using osu.Game.Localisation.SkinComponents;
using osu.Game.Overlays.Settings;
using osuTK;
using osuTK.Graphics;
@@ -16,12 +18,13 @@ namespace osu.Game.Skinning.Components
{
public bool UsesFixedAnchor { get; set; }
[SettingSource("Corner rounding", "How round the corners of the box should be.")]
public BindableFloat CornerRounding { get; } = new BindableFloat(1)
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.CornerRadius), nameof(SkinnableComponentStrings.CornerRadiusDescription),
SettingControlType = typeof(SettingsPercentageSlider<float>))]
public new BindableFloat CornerRadius { get; } = new BindableFloat(0.25f)
{
Precision = 0.01f,
MinValue = 0,
MaxValue = 1,
MaxValue = 0.5f,
Precision = 0.01f
};
public BoxElement()
@@ -44,7 +47,7 @@ namespace osu.Game.Skinning.Components
{
base.Update();
CornerRadius = CornerRounding.Value * Math.Min(DrawWidth, DrawHeight) * 0.5f;
base.CornerRadius = CornerRadius.Value * Math.Min(DrawWidth, DrawHeight);
}
}
}