1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 13:22:55 +08:00

Make zoom an int again

This commit is contained in:
smoogipoo 2018-04-05 18:41:22 +09:00
parent 074dee3a83
commit eff5eddbe9

View File

@ -61,14 +61,14 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
return true; return true;
} }
private float zoomTarget = 10; private int zoomTarget = 10;
private void setZoomTarget(float newZoom, float focusPoint) private void setZoomTarget(int newZoom, float focusPoint)
{ {
zoomTarget = MathHelper.Clamp(newZoom, 1, 60); zoomTarget = MathHelper.Clamp(newZoom, 1, 60);
transformZoomTo(zoomTarget, focusPoint, 200, Easing.OutQuint); transformZoomTo(zoomTarget, focusPoint, 200, Easing.OutQuint);
} }
private void transformZoomTo(float newZoom, float focusPoint, double duration = 0, Easing easing = Easing.None) private void transformZoomTo(int newZoom, float focusPoint, double duration = 0, Easing easing = Easing.None)
=> this.TransformTo(this.PopulateTransform(new TransformZoom(focusPoint, waveformContainer.DrawWidth, DrawWidth, Current), newZoom, duration, easing)); => this.TransformTo(this.PopulateTransform(new TransformZoom(focusPoint, waveformContainer.DrawWidth, DrawWidth, Current), newZoom, duration, easing));
private class TransformZoom : Transform<float, ScrollingTimelineContainer> private class TransformZoom : Transform<float, ScrollingTimelineContainer>