Merge branch 'screen-title-class' of github.com:Jorolf/osu into profile-header-update

This commit is contained in:
jorolf
2019-03-09 20:22:33 +01:00
62 changed files with 762 additions and 434 deletions

View File

@ -76,7 +76,7 @@ namespace osu.Game.Graphics.UserInterface
{
Masking = true,
RelativeSizeAxes = Axes.Both,
Child = path = new SmoothPath { RelativeSizeAxes = Axes.Both, PathWidth = 1.5f }
Child = path = new SmoothPath { RelativeSizeAxes = Axes.Both, PathRadius = 1 }
});
}
@ -109,8 +109,10 @@ namespace osu.Game.Graphics.UserInterface
for (int i = 0; i < values.Length; i++)
{
float x = (i + count - values.Length) / (float)(count - 1) * DrawWidth - 1;
float y = GetYPosition(values[i]) * DrawHeight - path.PathWidth;
// 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
float x = (i + count - values.Length) / (float)(count - 1) * (DrawWidth - 2 * path.PathRadius);
float y = GetYPosition(values[i]) * (DrawHeight - 2 * path.PathRadius);
path.AddVertex(new Vector2(x, y));
}
}