1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Allow controlling music and effect volume via arrow keys when h… (#5135)

Allow controlling music and effect volume via arrow keys when hovering

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert 2019-06-24 22:21:08 +09:00 committed by GitHub
commit 12faffc7b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,10 @@ namespace osu.Game.Overlays
case GlobalAction.DecreaseVolume:
if (State.Value == Visibility.Hidden)
Show();
else if (volumeMeterMusic.IsHovered)
volumeMeterMusic.Decrease(amount, isPrecise);
else if (volumeMeterEffect.IsHovered)
volumeMeterEffect.Decrease(amount, isPrecise);
else
volumeMeterMaster.Decrease(amount, isPrecise);
return true;
@ -109,6 +113,10 @@ namespace osu.Game.Overlays
case GlobalAction.IncreaseVolume:
if (State.Value == Visibility.Hidden)
Show();
else if (volumeMeterMusic.IsHovered)
volumeMeterMusic.Increase(amount, isPrecise);
else if (volumeMeterEffect.IsHovered)
volumeMeterEffect.Increase(amount, isPrecise);
else
volumeMeterMaster.Increase(amount, isPrecise);
return true;