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, RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[] ColumnDimensions = new[]
{ {
new Dimension(GridSizeMode.Absolute, 220), new Dimension(GridSizeMode.Absolute, 170),
new Dimension(), new Dimension(),
new Dimension(GridSizeMode.Absolute, 220), new Dimension(GridSizeMode.Absolute, 220),
new Dimension(GridSizeMode.Absolute, 120), new Dimension(GridSizeMode.Absolute, 120),

View File

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