mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Allow changing volume using alt when hovering scroll containers (#7213)
Allow changing volume using alt when hovering scroll containers Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
commit
5761d763ec
@ -83,6 +83,15 @@ namespace osu.Game.Graphics.Containers
|
|||||||
return base.OnDragEnd(e);
|
return base.OnDragEnd(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnScroll(ScrollEvent e)
|
||||||
|
{
|
||||||
|
// allow for controlling volume when alt is held.
|
||||||
|
// mostly for compatibility with osu-stable.
|
||||||
|
if (e.AltPressed) return false;
|
||||||
|
|
||||||
|
return base.OnScroll(e);
|
||||||
|
}
|
||||||
|
|
||||||
protected override ScrollbarContainer CreateScrollbar(Direction direction) => new OsuScrollbar(direction);
|
protected override ScrollbarContainer CreateScrollbar(Direction direction) => new OsuScrollbar(direction);
|
||||||
|
|
||||||
protected class OsuScrollbar : ScrollbarContainer
|
protected class OsuScrollbar : ScrollbarContainer
|
||||||
|
Loading…
Reference in New Issue
Block a user