1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 17:03:21 +08:00

Use a better default size for line

This commit is contained in:
Dean Herbert 2023-11-10 14:03:24 +09:00
parent f31c1c9c79
commit 99d9db5b76
No known key found for this signature in database
2 changed files with 10 additions and 16 deletions

View File

@ -137,7 +137,12 @@ namespace osu.Game.Skinning
health.Position = new Vector2(components_x_offset, 20f);
if (healthLine != null)
healthLine.Y = health.Y;
{
healthLine.Anchor = Anchor.TopLeft;
healthLine.Origin = Anchor.CentreLeft;
healthLine.Y = health.Y + ArgonHealthDisplay.MAIN_PATH_RADIUS;
healthLine.Size = new Vector2(45, 3);
}
if (scoreWedge != null)
{

View File

@ -1,29 +1,18 @@
// 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 osuTK;
namespace osu.Game.Skinning.Components
{
public partial class RoundedLine : CompositeDrawable, ISerialisableDrawable
public partial class RoundedLine : Circle, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }
[BackgroundDependencyLoader]
private void load()
public RoundedLine()
{
AutoSizeAxes = Axes.Both;
InternalChild = new Circle
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Width = 45f,
Height = 3f,
};
Size = new Vector2(200, 8);
}
}
}