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

Restructure Editor construction

This commit is contained in:
smoogipoo 2017-10-02 09:26:16 +09:00
parent 7b1ef53f36
commit 221902f4fe

View File

@ -26,57 +26,61 @@ namespace osu.Game.Screens.Edit
public Editor() public Editor()
{ {
Add(new Container EditorMenuBar menuBar;
SummaryTimeline timeline;
Children = new[]
{ {
RelativeSizeAxes = Axes.X, new Container
Height = 40,
Children = new Drawable[]
{ {
new EditorMenuBar Name = "Top bar",
RelativeSizeAxes = Axes.X,
Height = 40,
Child = menuBar = new EditorMenuBar
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
RelativeSizeAxes = Axes.Both RelativeSizeAxes = Axes.Both
} }
} },
}); new Container
SummaryTimeline summaryTimeline;
Add(new Container
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X,
Height = 60,
Children = new Drawable[]
{ {
bottomBackground = new Box { RelativeSizeAxes = Axes.Both }, Name = "Bottom bar",
new Container Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X,
Height = 60,
Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.Both, bottomBackground = new Box { RelativeSizeAxes = Axes.Both },
Padding = new MarginPadding { Top = 5, Bottom = 5, Left = 10, Right = 10 }, new Container
Child = new FillFlowContainer
{ {
Name = "Bottom bar",
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal, Padding = new MarginPadding { Top = 5, Bottom = 5, Left = 10, Right = 10 },
Spacing = new Vector2(10, 0), Child = new FillFlowContainer
Children = new[]
{ {
summaryTimeline = new SummaryTimeline Name = "Bottom bar",
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Children = new[]
{ {
Anchor = Anchor.Centre, timeline = new SummaryTimeline
Origin = Anchor.Centre, {
RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre,
Width = 0.65f Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Width = 0.65f
}
} }
} }
} }
} }
},
} }
}); };
summaryTimeline.Beatmap.BindTo(Beatmap); timeline.Beatmap.BindTo(Beatmap);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]