1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Fix speed controls in mod select overlay not handling repeat

This commit is contained in:
Bartłomiej Dach 2024-05-24 13:09:07 +02:00
parent 345fb60679
commit 8cac87e496
No known key found for this signature in database

View File

@ -704,6 +704,17 @@ namespace osu.Game.Overlays.Mods
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
{
switch (e.Action)
{
case GlobalAction.IncreaseModSpeed:
modSpeedHotkeyHandler.ChangeSpeed(0.05, AllAvailableMods.Where(state => state.ValidForSelection.Value).Select(state => state.Mod));
return true;
case GlobalAction.DecreaseModSpeed:
modSpeedHotkeyHandler.ChangeSpeed(-0.05, AllAvailableMods.Where(state => state.ValidForSelection.Value).Select(state => state.Mod));
return true;
}
if (e.Repeat)
return false;
@ -755,14 +766,6 @@ namespace osu.Game.Overlays.Mods
return true;
}
case GlobalAction.IncreaseModSpeed:
modSpeedHotkeyHandler.ChangeSpeed(0.05, AllAvailableMods.Where(state => state.ValidForSelection.Value).Select(state => state.Mod));
return true;
case GlobalAction.DecreaseModSpeed:
modSpeedHotkeyHandler.ChangeSpeed(-0.05, AllAvailableMods.Where(state => state.ValidForSelection.Value).Select(state => state.Mod));
return true;
}
return base.OnPressed(e);