Update framework

This commit is contained in:
Dean Herbert
2018-06-03 02:28:11 +09:00
parent 88628812c6
commit 64eda27547
6 changed files with 11 additions and 11 deletions

View File

@ -180,7 +180,7 @@ namespace osu.Game.Overlays.KeyBinding
return true; return true;
} }
protected override bool OnWheel(InputState state) protected override bool OnScroll(InputState state)
{ {
if (HasFocus) if (HasFocus)
{ {
@ -192,7 +192,7 @@ namespace osu.Game.Overlays.KeyBinding
} }
} }
return base.OnWheel(state); return base.OnScroll(state);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)

View File

@ -182,9 +182,9 @@ namespace osu.Game.Screens.Edit
LoadComponentAsync(currentScreen, screenContainer.Add); LoadComponentAsync(currentScreen, screenContainer.Add);
} }
protected override bool OnWheel(InputState state) protected override bool OnScroll(InputState state)
{ {
if (state.Mouse.WheelDelta > 0) if (state.Mouse.ScrollDelta.X + state.Mouse.ScrollDelta.Y > 0)
clock.SeekBackward(true); clock.SeekBackward(true);
else else
clock.SeekForward(true); clock.SeekForward(true);

View File

@ -123,15 +123,15 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
/// </summary> /// </summary>
private float? localZoomTarget; private float? localZoomTarget;
protected override bool OnWheel(InputState state) protected override bool OnScroll(InputState state)
{ {
if (!state.Keyboard.ControlPressed) if (!state.Keyboard.ControlPressed)
return base.OnWheel(state); return base.OnScroll(state);
relativeContentZoomTarget = Content.ToLocalSpace(state.Mouse.NativeState.Position).X / Content.DrawSize.X; relativeContentZoomTarget = Content.ToLocalSpace(state.Mouse.NativeState.Position).X / Content.DrawSize.X;
localZoomTarget = ToLocalSpace(state.Mouse.NativeState.Position).X; localZoomTarget = ToLocalSpace(state.Mouse.NativeState.Position).X;
Zoom += state.Mouse.WheelDelta; Zoom += state.Mouse.ScrollDelta.Y;
return true; return true;
} }

View File

@ -364,7 +364,7 @@ namespace osu.Game.Screens.Play
Background?.FadeTo(1f, fade_out_duration); Background?.FadeTo(1f, fade_out_duration);
} }
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused; protected override bool OnScroll(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
private void initializeStoryboard(bool asyncLoad) private void initializeStoryboard(bool asyncLoad)
{ {

View File

@ -59,9 +59,9 @@ namespace osu.Game.Tests.Visual
Clock.ProcessFrame(); Clock.ProcessFrame();
} }
protected override bool OnWheel(InputState state) protected override bool OnScroll(InputState state)
{ {
if (state.Mouse.WheelDelta > 0) if (state.Mouse.ScrollDelta.Y > 0)
Clock.SeekBackward(true); Clock.SeekBackward(true);
else else
Clock.SeekForward(true); Clock.SeekForward(true);