1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 17:57:29 +08:00

prevent volume control from eating inputs

This commit is contained in:
OliBomby 2024-07-07 21:33:27 +02:00
parent ba44757c86
commit 5da8bb5bec
2 changed files with 12 additions and 8 deletions

View File

@ -23,15 +23,15 @@ namespace osu.Game.Overlays.Volume
{ {
case GlobalAction.DecreaseVolume: case GlobalAction.DecreaseVolume:
case GlobalAction.IncreaseVolume: case GlobalAction.IncreaseVolume:
ActionRequested?.Invoke(e.Action); return ActionRequested?.Invoke(e.Action) == true;
return true;
case GlobalAction.ToggleMute: case GlobalAction.ToggleMute:
case GlobalAction.NextVolumeMeter: case GlobalAction.NextVolumeMeter:
case GlobalAction.PreviousVolumeMeter: case GlobalAction.PreviousVolumeMeter:
if (!e.Repeat) if (!e.Repeat)
ActionRequested?.Invoke(e.Action); return ActionRequested?.Invoke(e.Action) == true;
return true;
return false;
} }
return false; return false;

View File

@ -120,13 +120,17 @@ namespace osu.Game.Overlays
return true; return true;
case GlobalAction.NextVolumeMeter: case GlobalAction.NextVolumeMeter:
if (State.Value == Visibility.Visible) if (State.Value != Visibility.Visible)
return false;
volumeMeters.SelectNext(); volumeMeters.SelectNext();
Show(); Show();
return true; return true;
case GlobalAction.PreviousVolumeMeter: case GlobalAction.PreviousVolumeMeter:
if (State.Value == Visibility.Visible) if (State.Value != Visibility.Visible)
return false;
volumeMeters.SelectPrevious(); volumeMeters.SelectPrevious();
Show(); Show();
return true; return true;