1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 06:52:56 +08:00

Merge pull request #22429 from peppy/fix-health-display-anchor-point

Fix default health bar having a very weird anchor point in the skin editor
This commit is contained in:
Bartłomiej Dach 2023-01-28 10:33:59 +01:00 committed by GitHub
commit d38316bf4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,11 +78,19 @@ namespace osu.Game.Screens.Play.HUD
public DefaultHealthDisplay()
{
Size = new Vector2(1, 5);
RelativeSizeAxes = Axes.X;
Margin = new MarginPadding { Top = 20 };
const float padding = 20;
const float bar_height = 5;
InternalChildren = new Drawable[]
Size = new Vector2(1, bar_height + padding * 2);
RelativeSizeAxes = Axes.X;
InternalChild = new Container
{
Padding = new MarginPadding { Vertical = padding },
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Box
{
@ -102,6 +110,7 @@ namespace osu.Game.Screens.Play.HUD
}
}
},
}
};
}