Restructure Compose to use grids and eventually support HitObjectContainer

This commit is contained in:
smoogipoo 2017-11-29 16:47:36 +09:00
parent 2ec24f58c8
commit f586cbac32

View File

@ -12,40 +12,62 @@ namespace osu.Game.Screens.Edit.Screens.Compose
{
public class Compose : EditorScreen
{
private const float vertical_margins = 10;
private const float horizontal_margins = 20;
public Compose()
{
ScrollableTimeline timeline;
Children = new[]
Children = new Drawable[]
{
new Container
new GridContainer
{
Name = "Timeline",
RelativeSizeAxes = Axes.X,
Height = 110,
Children = new Drawable[]
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new Box
new Drawable[]
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(0.5f)
},
new Container
{
Name = "Content",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = 17, Vertical = 10 },
Children = new Drawable[]
new Container
{
new Container
Name = "Timeline",
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Right = 115 },
Child = timeline = new ScrollableTimeline { RelativeSizeAxes = Axes.Both }
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(0.5f)
},
new Container
{
Name = "Timeline content",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = horizontal_margins, Vertical = vertical_margins },
Children = new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Right = 115 },
Child = timeline = new ScrollableTimeline { RelativeSizeAxes = Axes.Both }
}
}
}
}
}
},
new Drawable[]
{
new Container
{
Name = "Composer content",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = horizontal_margins, Vertical = vertical_margins },
}
}
}
}
},
RowDimensions = new[] { new Dimension(GridSizeMode.Absolute, 110) }
},
};
timeline.Beatmap.BindTo(Beatmap);