1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Make scrolling only zoom the timeline

This commit is contained in:
smoogipoo 2018-06-12 15:49:42 +09:00
parent b90cdfbfd1
commit aaf2f66594

View File

@ -99,10 +99,9 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
protected override bool OnScroll(InputState state)
{
if (!state.Keyboard.ControlPressed)
if (state.Mouse.HasPreciseScroll)
return base.OnScroll(state);
setZoomTarget(zoomTarget + state.Mouse.ScrollDelta.X, zoomedContent.ToLocalSpace(state.Mouse.NativeState.Position).X);
setZoomTarget(zoomTarget + state.Mouse.ScrollDelta.Y, zoomedContent.ToLocalSpace(state.Mouse.NativeState.Position).X);
return true;
}