1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 22:43:05 +08:00

Bring back left-side line next to health display

Makes the score counter not look weird when it reaches 8 digits
This commit is contained in:
Salman Ahmed 2023-11-08 02:06:51 +03:00
parent fdc714a248
commit 4de5454538
3 changed files with 38 additions and 5 deletions

View File

@ -90,12 +90,11 @@ namespace osu.Game.Screens.Play.HUD
}
}
private const float main_path_radius = 10f;
public const float MAIN_PATH_RADIUS = 10f;
[BackgroundDependencyLoader]
private void load()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
InternalChild = new Container
@ -105,7 +104,7 @@ namespace osu.Game.Screens.Play.HUD
{
background = new BackgroundPath
{
PathRadius = main_path_radius,
PathRadius = MAIN_PATH_RADIUS,
},
glowBar = new BarPath
{
@ -125,7 +124,7 @@ namespace osu.Game.Screens.Play.HUD
Blending = BlendingParameters.Additive,
BarColour = main_bar_colour,
GlowColour = main_bar_glow_colour,
PathRadius = main_path_radius,
PathRadius = MAIN_PATH_RADIUS,
GlowPortion = 0.6f,
},
}
@ -248,7 +247,7 @@ namespace osu.Game.Screens.Play.HUD
private void updatePath()
{
float barLength = DrawWidth - main_path_radius * 2;
float barLength = DrawWidth - MAIN_PATH_RADIUS * 2;
float curveStart = barLength - 70;
float curveEnd = barLength - 40;

View File

@ -0,0 +1,30 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonHealthRightLine : CompositeDrawable, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }
[BackgroundDependencyLoader]
private void load()
{
Size = new Vector2(50f, ArgonHealthDisplay.MAIN_PATH_RADIUS * 2);
InternalChild = new Circle
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Width = 45f,
Height = 3f,
};
}
}
}

View File

@ -115,6 +115,7 @@ namespace osu.Game.Skinning
var skinnableTargetWrapper = new DefaultSkinComponentsContainer(container =>
{
var health = container.OfType<ArgonHealthDisplay>().FirstOrDefault();
var healthLine = container.OfType<ArgonHealthRightLine>().FirstOrDefault();
var scoreWedge = container.OfType<ArgonScoreWedge>().FirstOrDefault();
var score = container.OfType<ArgonScoreCounter>().FirstOrDefault();
var accuracy = container.OfType<ArgonAccuracyCounter>().FirstOrDefault();
@ -134,6 +135,9 @@ namespace osu.Game.Skinning
health.BarHeight.Value = 30f;
health.Position = new Vector2(components_x_offset, 20f);
if (healthLine != null)
healthLine.Y = health.Y;
if (scoreWedge != null)
{
scoreWedge.Position = new Vector2(-50, 15);