Extract zoom delta method

This commit is contained in:
Adam Baker
2022-07-21 17:28:43 -05:00
parent a4f071fe53
commit d69dc457ba
2 changed files with 5 additions and 5 deletions

View File

@ -20,8 +20,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
private readonly Drawable userContent;
private const float zoom_button_sensitivity = 0.02f;
public TimelineArea(Drawable content = null)
{
RelativeSizeAxes = Axes.X;
@ -156,6 +154,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
Timeline.TicksVisible.BindTo(ticksCheckbox.Current);
}
private void changeZoom(float change) => Timeline.Zoom += change * Timeline.MaxZoom * zoom_button_sensitivity;
private void changeZoom(float change) => Timeline.Zoom += Timeline.CalculateZoomChange(change);
}
}