mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Fix speed controls in mod select overlay not handling repeat
This commit is contained in:
parent
345fb60679
commit
8cac87e496
@ -704,6 +704,17 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
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)
|
if (e.Repeat)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -755,14 +766,6 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
return true;
|
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);
|
return base.OnPressed(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user