Make zoom sensitivity relative to containers max zoom

This commit is contained in:
Adam Baker
2022-07-21 08:26:48 -05:00
parent 5db4d9437a
commit a4f071fe53
2 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,8 @@ 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;
@ -154,6 +156,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
Timeline.TicksVisible.BindTo(ticksCheckbox.Current);
}
private void changeZoom(float change) => Timeline.Zoom += change;
private void changeZoom(float change) => Timeline.Zoom += change * Timeline.MaxZoom * zoom_button_sensitivity;
}
}