1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Adjust text and alignment

This commit is contained in:
Dean Herbert 2023-05-23 16:21:56 +09:00
parent 3054348c73
commit c8303d55cd

View File

@ -57,6 +57,8 @@ namespace osu.Game.Rulesets.Osu.Statistics
[BackgroundDependencyLoader]
private void load()
{
const float line_extension = 0.2f;
InternalChild = new Container
{
Anchor = Anchor.Centre,
@ -97,83 +99,69 @@ namespace osu.Game.Rulesets.Osu.Statistics
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Box
new Circle
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
EdgeSmoothness = new Vector2(1),
RelativeSizeAxes = Axes.Y,
Width = line_thickness / 2, // adjust for edgesmoothness
Height = MathF.Sqrt(2),
Width = line_thickness,
Height = inner_portion + line_extension,
Rotation = -rotation * 2,
Alpha = 0.3f,
Alpha = 0.6f,
},
new Box
new Circle
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
EdgeSmoothness = new Vector2(1),
RelativeSizeAxes = Axes.Y,
Width = line_thickness / 2, // adjust for edgesmoothness
Height = MathF.Sqrt(2),
Width = line_thickness,
Height = inner_portion + line_extension,
},
new OsuSpriteText
{
Text = "Next",
Text = "Overshoot",
Anchor = Anchor.Centre,
Origin = Anchor.BottomRight,
Origin = Anchor.BottomCentre,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = -inner_portion / 2,
Y = -(inner_portion + line_extension) / 2,
},
new OsuSpriteText
{
Text = "object",
Text = "Undershoot",
Anchor = Anchor.Centre,
Origin = Anchor.BottomLeft,
Origin = Anchor.TopCentre,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = -inner_portion / 2,
Y = (inner_portion + line_extension) / 2,
},
new OsuSpriteText
new Circle
{
Text = "Last",
Anchor = Anchor.Centre,
Origin = Anchor.TopRight,
Padding = new MarginPadding(3),
Origin = Anchor.TopCentre,
RelativePositionAxes = Axes.Both,
Y = inner_portion / 2,
},
new OsuSpriteText
{
Text = "object",
Anchor = Anchor.Centre,
Origin = Anchor.TopLeft,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = inner_portion / 2,
},
}
},
},
new Box
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Width = 10,
EdgeSmoothness = new Vector2(1),
Height = line_thickness / 2, // adjust for edgesmoothness
},
new Box
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
EdgeSmoothness = new Vector2(1),
Width = line_thickness / 2, // adjust for edgesmoothness
Y = -(inner_portion + line_extension) / 2,
Margin = new MarginPadding(-line_thickness / 2),
Width = line_thickness,
Height = 10,
Rotation = 45,
},
new Circle
{
Anchor = Anchor.Centre,
Origin = Anchor.TopCentre,
RelativePositionAxes = Axes.Both,
Y = -(inner_portion + line_extension) / 2,
Margin = new MarginPadding(-line_thickness / 2),
Width = line_thickness,
Height = 10,
Rotation = -45,
}
}
},
},
}
},
bufferedGrid = new BufferedContainer(cachedFrameBuffer: true)
{
RelativeSizeAxes = Axes.Both,