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

Use left alignment and remove hacky text positioning code

This commit is contained in:
Dean Herbert 2022-05-26 18:12:28 +09:00
parent acd554d918
commit 7f4ea5d522
2 changed files with 5 additions and 6 deletions

View File

@ -41,7 +41,7 @@ namespace osu.Game.Screens.Edit
RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[]
{
new Dimension(GridSizeMode.Absolute, 220),
new Dimension(GridSizeMode.Absolute, 170),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 220),
new Dimension(GridSizeMode.Absolute, 120),

View File

@ -31,8 +31,8 @@ namespace osu.Game.Screens.Edit.Components
{
trackTimer = new OsuSpriteText
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Spacing = new Vector2(-2, 0),
Font = OsuFont.Torus.With(size: 36, fixedWidth: true, weight: FontWeight.Light),
Y = -10,
@ -40,9 +40,9 @@ namespace osu.Game.Screens.Edit.Components
bpm = new OsuSpriteText
{
Colour = colours.Orange1,
Anchor = Anchor.CentreRight,
Anchor = Anchor.CentreLeft,
Font = OsuFont.Torus.With(size: 18, weight: FontWeight.SemiBold),
Y = 5,
Position = new Vector2(2, 5),
}
};
}
@ -52,7 +52,6 @@ namespace osu.Game.Screens.Edit.Components
base.Update();
trackTimer.Text = editorClock.CurrentTime.ToEditorFormattedString();
bpm.Text = @$"{editorBeatmap.ControlPointInfo.TimingPointAt(editorClock.CurrentTime).BPM:0} BPM";
bpm.X = 5 - trackTimer.DrawWidth;
}
}
}