mirror of
https://github.com/osukey/osukey.git
synced 2025-05-20 04:57:38 +09: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:
commit
d38316bf4f
@ -78,30 +78,39 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
public DefaultHealthDisplay()
|
public DefaultHealthDisplay()
|
||||||
{
|
{
|
||||||
Size = new Vector2(1, 5);
|
const float padding = 20;
|
||||||
RelativeSizeAxes = Axes.X;
|
const float bar_height = 5;
|
||||||
Margin = new MarginPadding { Top = 20 };
|
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
Size = new Vector2(1, bar_height + padding * 2);
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
|
InternalChild = new Container
|
||||||
{
|
{
|
||||||
new Box
|
Padding = new MarginPadding { Vertical = padding },
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Box
|
||||||
Colour = Color4.Black,
|
|
||||||
},
|
|
||||||
fill = new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Size = new Vector2(0, 1),
|
|
||||||
Masking = true,
|
|
||||||
Children = new[]
|
|
||||||
{
|
{
|
||||||
new Box
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
|
},
|
||||||
|
fill = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Size = new Vector2(0, 1),
|
||||||
|
Masking = true,
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user