1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +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] [BackgroundDependencyLoader]
private void load() private void load()
{ {
const float line_extension = 0.2f;
InternalChild = new Container InternalChild = new Container
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -97,83 +99,69 @@ namespace osu.Game.Rulesets.Osu.Statistics
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Circle
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
EdgeSmoothness = new Vector2(1),
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = line_thickness / 2, // adjust for edgesmoothness Width = line_thickness,
Height = MathF.Sqrt(2), Height = inner_portion + line_extension,
Rotation = -rotation * 2, Rotation = -rotation * 2,
Alpha = 0.3f, Alpha = 0.6f,
}, },
new Box new Circle
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
EdgeSmoothness = new Vector2(1),
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = line_thickness / 2, // adjust for edgesmoothness Width = line_thickness,
Height = MathF.Sqrt(2), Height = inner_portion + line_extension,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = "Next", Text = "Overshoot",
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.BottomRight, Origin = Anchor.BottomCentre,
Padding = new MarginPadding(3), Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both, RelativePositionAxes = Axes.Both,
Y = -inner_portion / 2, Y = -(inner_portion + line_extension) / 2,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = "object", Text = "Undershoot",
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.BottomLeft, Origin = Anchor.TopCentre,
Padding = new MarginPadding(3), Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both, RelativePositionAxes = Axes.Both,
Y = -inner_portion / 2, Y = (inner_portion + line_extension) / 2,
}, },
new OsuSpriteText new Circle
{ {
Text = "Last",
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.TopRight, Origin = Anchor.TopCentre,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both, RelativePositionAxes = Axes.Both,
Y = inner_portion / 2, Y = -(inner_portion + line_extension) / 2,
}, Margin = new MarginPadding(-line_thickness / 2),
new OsuSpriteText Width = line_thickness,
{
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
Height = 10, 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) bufferedGrid = new BufferedContainer(cachedFrameBuffer: true)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,