1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 16:43:04 +08:00

Move Control Group timing data into it's own component

This commit is contained in:
Jai Sharma 2022-11-27 02:47:02 +00:00
parent b6d7bec240
commit 792334a190

View File

@ -90,11 +90,19 @@ namespace osu.Game.Screens.Edit.Timing
{ {
return new Drawable[] return new Drawable[]
{ {
new FillFlowContainer new ControlGroupTiming(group),
new ControlGroupAttributes(group, c => c is not TimingControlPoint)
};
}
private partial class ControlGroupTiming : FillFlowContainer
{ {
RelativeSizeAxes = Axes.Y, public ControlGroupTiming(ControlPointGroup group)
Width = TIMING_COLUMN_WIDTH, {
Spacing = new Vector2(5), Name = @"ControlGroupTiming";
RelativeSizeAxes = Axes.Y;
Width = TIMING_COLUMN_WIDTH;
Spacing = new Vector2(5);
Children = new Drawable[] Children = new Drawable[]
{ {
new OsuSpriteText new OsuSpriteText
@ -110,11 +118,9 @@ namespace osu.Game.Screens.Edit.Timing
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
} }
}
},
new ControlGroupAttributes(group, c => !(c is TimingControlPoint))
}; };
} }
}
private partial class ControlGroupAttributes : CompositeDrawable private partial class ControlGroupAttributes : CompositeDrawable
{ {
@ -130,6 +136,7 @@ namespace osu.Game.Screens.Edit.Timing
AutoSizeAxes = Axes.X; AutoSizeAxes = Axes.X;
RelativeSizeAxes = Axes.Y; RelativeSizeAxes = Axes.Y;
Name = @"ControlGroupAttributes";
InternalChild = fill = new FillFlowContainer InternalChild = fill = new FillFlowContainer
{ {