1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:02:55 +08:00

Stop Player from blocking volume adjust when Alt it held

Similar case to what we already have in `OsuScrollContainer`, so there
is precedent for handling this locally in this fashion.
This commit is contained in:
Dean Herbert 2021-12-03 16:56:34 +09:00
parent aaa46960b3
commit 6b73672403

View File

@ -768,7 +768,15 @@ namespace osu.Game.Screens.Play
Scheduler.Add(resultsDisplayDelegate);
}
protected override bool OnScroll(ScrollEvent e) => mouseWheelDisabled.Value && !GameplayClockContainer.IsPaused.Value;
protected override bool OnScroll(ScrollEvent e)
{
// During pause, allow global volume adjust regardless of settings.
if (GameplayClockContainer.IsPaused.Value)
return false;
// Block global volume adjust if the user has asked for it (special case when holding "Alt").
return mouseWheelDisabled.Value && !e.AltPressed;
}
#region Fail Logic