1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 18:37:51 +08:00

Slim down bottom timeline

This removes the BPM display, which is commonly cited to have
no functional purpose by users, and reduces the height of the bottom bar
in exchange for more space for the playfield.
This commit is contained in:
Bartłomiej Dach 2024-07-08 12:33:32 +02:00
parent 50818da166
commit 29b8948609
No known key found for this signature in database
4 changed files with 5 additions and 29 deletions

View File

@ -31,7 +31,7 @@ namespace osu.Game.Screens.Edit
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = 60; Height = 40;
Masking = true; Masking = true;
EdgeEffect = new EdgeEffectParameters EdgeEffect = new EdgeEffectParameters

View File

@ -46,8 +46,8 @@ namespace osu.Game.Screens.Edit.Components
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Scale = new Vector2(1.4f), Scale = new Vector2(1.2f),
IconScale = new Vector2(1.4f), IconScale = new Vector2(1.2f),
Icon = FontAwesome.Regular.PlayCircle, Icon = FontAwesome.Regular.PlayCircle,
Action = togglePause, Action = togglePause,
}, },

View File

@ -17,8 +17,6 @@ namespace osu.Game.Screens.Edit.Components
{ {
public partial class TimeInfoContainer : BottomBarContainer public partial class TimeInfoContainer : BottomBarContainer
{ {
private OsuSpriteText bpm = null!;
[Resolved] [Resolved]
private EditorBeatmap editorBeatmap { get; set; } = null!; private EditorBeatmap editorBeatmap { get; set; } = null!;
@ -26,38 +24,16 @@ namespace osu.Game.Screens.Edit.Components
private EditorClock editorClock { get; set; } = null!; private EditorClock editorClock { get; set; } = null!;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours, OverlayColourProvider colourProvider) private void load(OverlayColourProvider colourProvider)
{ {
Background.Colour = colourProvider.Background5; Background.Colour = colourProvider.Background5;
Children = new Drawable[] Children = new Drawable[]
{ {
new TimestampControl(), new TimestampControl(),
bpm = new OsuSpriteText
{
Colour = colours.Orange1,
Anchor = Anchor.CentreLeft,
Font = OsuFont.Torus.With(size: 18, weight: FontWeight.SemiBold),
Position = new Vector2(2, 5),
}
}; };
} }
private double? lastBPM;
protected override void Update()
{
base.Update();
double newBPM = editorBeatmap.ControlPointInfo.TimingPointAt(editorClock.CurrentTime).BPM;
if (lastBPM != newBPM)
{
lastBPM = newBPM;
bpm.Text = @$"{newBPM:0} BPM";
}
}
private partial class TimestampControl : OsuClickableContainer private partial class TimestampControl : OsuClickableContainer
{ {
private Container hoverLayer = null!; private Container hoverLayer = null!;

View File

@ -325,7 +325,7 @@ namespace osu.Game.Screens.Edit
{ {
Name = "Screen container", Name = "Screen container",
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = 40, Bottom = 60 }, Padding = new MarginPadding { Top = 40, Bottom = 40 },
Child = screenContainer = new Container<EditorScreen> Child = screenContainer = new Container<EditorScreen>
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,