1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 20:53:04 +08:00

Rename PathWidth to PathRadius

This commit is contained in:
David Zhao 2019-03-07 17:39:19 +09:00
parent b2f4850275
commit b3e046c4d1
3 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
path = new SmoothPath path = new SmoothPath
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
PathWidth = 1 PathRadius = 1
}, },
marker = new CircularContainer marker = new CircularContainer
{ {

View File

@ -21,8 +21,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public float PathWidth public float PathWidth
{ {
get => path.PathWidth; get => path.PathRadius;
set => path.PathWidth = value; set => path.PathRadius = value;
} }
/// <summary> /// <summary>

View File

@ -69,7 +69,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
Masking = true, Masking = true,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Child = path = new SmoothPath { RelativeSizeAxes = Axes.Both, PathWidth = 1 } Child = path = new SmoothPath { RelativeSizeAxes = Axes.Both, PathRadius = 1 }
}); });
} }
@ -104,8 +104,8 @@ namespace osu.Game.Graphics.UserInterface
{ {
// Make sure that we are accounting for path width when calculating vertex positions // Make sure that we are accounting for path width when calculating vertex positions
// We need to apply 2x the path radius to account for it because the full diameter of the line accounts into height // We need to apply 2x the path radius to account for it because the full diameter of the line accounts into height
float x = (i + count - values.Length) / (float)(count - 1) * (DrawWidth - 2 * path.PathWidth); float x = (i + count - values.Length) / (float)(count - 1) * (DrawWidth - 2 * path.PathRadius);
float y = GetYPosition(values[i]) * (DrawHeight - 2 * path.PathWidth); float y = GetYPosition(values[i]) * (DrawHeight - 2 * path.PathRadius);
path.AddVertex(new Vector2(x, y)); path.AddVertex(new Vector2(x, y));
} }
} }