1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 16:52:55 +08:00

Allow controlling music and effect volume by arrow keys when hovering

This commit is contained in:
Joehu 2019-06-23 22:53:02 -07:00
parent 85fdf7d97f
commit 7ac6558f59

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;