mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 09:02:58 +08:00
Improve layout of bottom bar in the Editor
This commit is contained in:
parent
58b09a161f
commit
7168e8fd99
@ -15,17 +15,18 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Screens.Edit.Menus;
|
using osu.Game.Screens.Edit.Menus;
|
||||||
using osu.Game.Screens.Edit.Components;
|
using osu.Game.Screens.Edit.Components;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit
|
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");
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||||
|
|
||||||
internal override bool ShowOverlays => false;
|
internal override bool ShowOverlays => false;
|
||||||
|
|
||||||
|
private readonly Box bottomBackground;
|
||||||
|
|
||||||
public Editor()
|
public Editor()
|
||||||
{
|
{
|
||||||
Add(new Container
|
Add(new Container
|
||||||
@ -192,22 +193,45 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new FillFlowContainer
|
Add(new Container
|
||||||
{
|
{
|
||||||
Name = "Bottom bar",
|
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 60,
|
Height = 60,
|
||||||
Padding = new MarginPadding { Top = 5, Bottom = 5, Left = 10, Right = 10 },
|
Children = new Drawable[]
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Spacing = new Vector2(10, 0),
|
|
||||||
Children = new[]
|
|
||||||
{
|
{
|
||||||
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)
|
protected override void OnResuming(Screen last)
|
||||||
|
Loading…
Reference in New Issue
Block a user