Add visualisation of bpm (timing) changes to timeline

This commit is contained in:
Dean Herbert
2020-10-01 18:07:39 +09:00
parent 70931abcb0
commit 0bced34272
2 changed files with 64 additions and 4 deletions

View File

@ -21,14 +21,11 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
public TimelineControlPointGroup(ControlPointGroup group)
{
Origin = Anchor.TopCentre;
Group = group;
RelativePositionAxes = Axes.X;
RelativeSizeAxes = Axes.Y;
Width = 1;
AutoSizeAxes = Axes.X;
X = (float)group.Time;
}
@ -40,6 +37,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
controlPoints = (BindableList<ControlPoint>)Group.ControlPoints.GetBoundCopy();
controlPoints.BindCollectionChanged((_, __) =>
{
ClearInternal();
foreach (var point in controlPoints)
{
switch (point)
@ -47,6 +46,10 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
case DifficultyControlPoint difficultyPoint:
AddInternal(new DifficultyPointPiece(difficultyPoint));
break;
case TimingControlPoint timingPoint:
AddInternal(new TimingPointPiece(timingPoint));
break;
}
}
}, true);