mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 22:23:22 +08:00
Forward any unhandled scroll events to volume overlay
This commit is contained in:
parent
3404b09010
commit
ed516f05c2
@ -25,6 +25,7 @@ using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -805,6 +806,13 @@ namespace osu.Game
|
||||
return d;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (introScreen == null) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user