Update argon score wedge design

This commit is contained in:
Salman Ahmed 2023-11-07 00:53:20 +03:00
parent 01e59d134a
commit 754e05213c
2 changed files with 1 additions and 44 deletions

View File

@ -5,22 +5,13 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Lines;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonScoreWedge : CompositeDrawable, ISerialisableDrawable
{
private SliderPath barPath = null!;
private const float main_path_radius = 1f;
public bool UsesFixedAnchor { get; set; }
[BackgroundDependencyLoader]
@ -28,30 +19,7 @@ namespace osu.Game.Screens.Play.HUD
{
AutoSizeAxes = Axes.Both;
const float bar_length = 430 - main_path_radius * 2;
const float bar_top = 0;
const float bar_bottom = 80;
const float curve_start = bar_length - 105;
const float curve_end = bar_length - 35;
const float curve_smoothness = 10;
Vector2 diagonalDir = (new Vector2(curve_end, bar_top) - new Vector2(curve_start, bar_bottom)).Normalized();
barPath = new SliderPath(new[]
{
new PathControlPoint(new Vector2(0, bar_bottom), PathType.Linear),
new PathControlPoint(new Vector2(curve_start - curve_smoothness, bar_bottom), PathType.Bezier),
new PathControlPoint(new Vector2(curve_start, bar_bottom)),
new PathControlPoint(new Vector2(curve_start, bar_bottom) + diagonalDir * curve_smoothness, PathType.Linear),
new PathControlPoint(new Vector2(curve_end, bar_top) - diagonalDir * curve_smoothness, PathType.Bezier),
new PathControlPoint(new Vector2(curve_end, bar_top)),
new PathControlPoint(new Vector2(curve_end + curve_smoothness, bar_top), PathType.Linear),
new PathControlPoint(new Vector2(bar_length, bar_top)),
});
var vertices = new List<Vector2>();
barPath.GetPathToProgress(vertices, 0, 1);
InternalChildren = new Drawable[]
{
@ -66,17 +34,6 @@ namespace osu.Game.Screens.Play.HUD
WedgeHeight = { Value = 72 },
Position = new Vector2(4, 5)
},
new SmoothPath
{
Colour = Color4.White,
PathRadius = 1f,
Vertices = vertices,
},
new Circle
{
Y = bar_bottom - 1.5f + main_path_radius,
Size = new Vector2(300f, 3f),
}
};
}
}

View File

@ -136,7 +136,7 @@ namespace osu.Game.Skinning
if (scoreWedge != null)
{
scoreWedge.Position = new Vector2(-50, 50);
scoreWedge.Position = new Vector2(-50, 15);
if (score != null)
score.Position = new Vector2(components_x_offset, scoreWedge.Y + 15);