mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +08:00
Disable adjusting volume via "select next" and "select previous" as fallbacks
This commit is contained in:
parent
cb0e698e04
commit
fd21e87670
@ -14,22 +14,8 @@ namespace osu.Game.Overlays.Volume
|
||||
public Func<GlobalAction, bool> ActionRequested;
|
||||
public Func<GlobalAction, float, bool, bool> ScrollActionRequested;
|
||||
|
||||
public bool OnPressed(GlobalAction action)
|
||||
{
|
||||
// if nothing else handles selection actions in the game, it's safe to let volume be adjusted.
|
||||
switch (action)
|
||||
{
|
||||
case GlobalAction.SelectPrevious:
|
||||
action = GlobalAction.IncreaseVolume;
|
||||
break;
|
||||
|
||||
case GlobalAction.SelectNext:
|
||||
action = GlobalAction.DecreaseVolume;
|
||||
break;
|
||||
}
|
||||
|
||||
return ActionRequested?.Invoke(action) ?? false;
|
||||
}
|
||||
public bool OnPressed(GlobalAction action) =>
|
||||
ActionRequested?.Invoke(action) ?? false;
|
||||
|
||||
public bool OnScroll(GlobalAction action, float amount, bool isPrecise) =>
|
||||
ScrollActionRequested?.Invoke(action, amount, isPrecise) ?? false;
|
||||
|
Loading…
Reference in New Issue
Block a user