1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:22:56 +08:00

Improve layout of bottom bar in the Editor

This commit is contained in:
smoogipooo 2017-09-20 18:16:03 +09:00
parent 58b09a161f
commit 7168e8fd99

View File

@ -15,17 +15,18 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Edit.Menus;
using osu.Game.Screens.Edit.Components;
using OpenTK;
using osu.Framework.Allocation;
namespace osu.Game.Screens.Edit
{
internal class Editor : ScreenWhiteBox
internal class Editor : OsuScreen
{
protected override IEnumerable<Type> PossibleChildren => new[] { typeof(EditSongSelect) };
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
internal override bool ShowOverlays => false;
private readonly Box bottomBackground;
public Editor()
{
Add(new Container
@ -192,22 +193,45 @@ namespace osu.Game.Screens.Edit
}
});
Add(new FillFlowContainer
Add(new Container
{
Name = "Bottom bar",
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X,
Height = 60,
Padding = new MarginPadding { Top = 5, Bottom = 5, Left = 10, Right = 10 },
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Children = new[]
Children = new Drawable[]
{
new SummaryTimeline { RelativeSizeAxes = Axes.Both }
bottomBackground = new Box { RelativeSizeAxes = Axes.Both },
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = 5, Bottom = 5, Left = 10, Right = 10 },
Child = new FillFlowContainer
{
Name = "Bottom bar",
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Children = new[]
{
new SummaryTimeline
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Width = 0.65f
}
}
}
}
}
});
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
bottomBackground.Colour = colours.Gray2;
}
protected override void OnResuming(Screen last)