mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:43:22 +08:00
Fix fall-through scroll redirection
This commit is contained in:
parent
05961e98d5
commit
a2f50af424
@ -879,13 +879,6 @@ namespace osu.Game
|
|||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnScroll(ScrollEvent e)
|
|
||||||
{
|
|
||||||
// forward any unhandled mouse scroll events to the volume control.
|
|
||||||
volume.Adjust(GlobalAction.IncreaseVolume, e.ScrollDelta.Y, e.IsPrecise);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool OnPressed(GlobalAction action)
|
public bool OnPressed(GlobalAction action)
|
||||||
{
|
{
|
||||||
if (introScreen == null) return false;
|
if (introScreen == null) return false;
|
||||||
|
@ -5,6 +5,7 @@ using System;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Volume
|
namespace osu.Game.Overlays.Volume
|
||||||
@ -17,6 +18,13 @@ namespace osu.Game.Overlays.Volume
|
|||||||
public bool OnPressed(GlobalAction action) =>
|
public bool OnPressed(GlobalAction action) =>
|
||||||
ActionRequested?.Invoke(action) ?? false;
|
ActionRequested?.Invoke(action) ?? false;
|
||||||
|
|
||||||
|
protected override bool OnScroll(ScrollEvent e)
|
||||||
|
{
|
||||||
|
// forward any unhandled mouse scroll events to the volume control.
|
||||||
|
ScrollActionRequested?.Invoke(GlobalAction.IncreaseVolume, e.ScrollDelta.Y, e.IsPrecise);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public bool OnScroll(GlobalAction action, float amount, bool isPrecise) =>
|
public bool OnScroll(GlobalAction action, float amount, bool isPrecise) =>
|
||||||
ScrollActionRequested?.Invoke(action, amount, isPrecise) ?? false;
|
ScrollActionRequested?.Invoke(action, amount, isPrecise) ?? false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user