1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 16:47:26 +08:00
osu-lazer/osu.Game/Screens/Edit/Timing/TimingScreen.cs

105 lines
3.3 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2019-10-09 15:06:16 +08:00
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Edit.Timing
{
2019-10-09 15:06:16 +08:00
public class TimingScreen : EditorScreenWithTimeline
{
2019-10-09 15:06:16 +08:00
protected override Drawable CreateMainContent() => new GridContainer
{
RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[]
{
new Dimension(),
new Dimension(GridSizeMode.Absolute, 200),
},
Content = new[]
{
new Drawable[]
{
new ControlPointList(),
new ControlPointSettings(),
},
}
};
public class ControlPointList : CompositeDrawable
{
2019-10-09 15:06:16 +08:00
[Resolved]
protected IBindable<WorkingBeatmap> Beatmap { get; private set; }
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
RelativeSizeAxes = Axes.Both;
InternalChildren = new Drawable[]
{
new Box
{
Colour = colours.Gray0,
RelativeSizeAxes = Axes.Both,
},
new OsuScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new ControlPointRow(),
new ControlPointRow(),
new ControlPointRow(),
new ControlPointRow(),
new ControlPointRow(),
new ControlPointRow(),
}
},
}
};
}
private class ControlPointRow : CompositeDrawable
{
public ControlPointRow()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
InternalChildren = new Drawable[]
{
new OsuSpriteText { Text = "sample row" },
};
}
}
}
public class ControlPointSettings : CompositeDrawable
{
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
RelativeSizeAxes = Axes.Both;
InternalChild = new Box
{
Colour = colours.Gray3,
RelativeSizeAxes = Axes.Both,
};
}
}
}
}