From 042f716b2ae70ea06ea469672a15875d08096132 Mon Sep 17 00:00:00 2001 From: iwa Date: Tue, 20 Jan 2026 22:21:21 +0100 Subject: [PATCH] revert: changes made for preset hotkeys in SequentialModHotkeyHandler --- .../Mods/Input/SequentialModHotkeyHandler.cs | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/osu.Game/Overlays/Mods/Input/SequentialModHotkeyHandler.cs b/osu.Game/Overlays/Mods/Input/SequentialModHotkeyHandler.cs index 127d5722d1..42e65c884e 100644 --- a/osu.Game/Overlays/Mods/Input/SequentialModHotkeyHandler.cs +++ b/osu.Game/Overlays/Mods/Input/SequentialModHotkeyHandler.cs @@ -12,10 +12,10 @@ namespace osu.Game.Overlays.Mods.Input { /// /// This implementation of receives a sequence of s, - /// and maps the sequence of keys onto the items it is provided in and . + /// and maps the sequence of keys onto the items it is provided in . /// In this case, particular mods are not bound to particular keys, the hotkeys are a byproduct of mod ordering. /// - public class SequentialModHotkeyHandler : IModHotkeyHandler, IPresetHotkeyHandler + public class SequentialModHotkeyHandler : IModHotkeyHandler { public static SequentialModHotkeyHandler Create(ModType modType) { @@ -35,11 +35,6 @@ namespace osu.Game.Overlays.Mods.Input } } - public static SequentialModHotkeyHandler CreateForPresets() - { - return new SequentialModHotkeyHandler(new[] { Key.Number1, Key.Number2, Key.Number3, Key.Number4, Key.Number5, Key.Number6, Key.Number7, Key.Number8, Key.Number9, Key.Number0 }); - } - private readonly Key[] toggleKeys; private SequentialModHotkeyHandler(Key[] keys) @@ -60,20 +55,5 @@ namespace osu.Game.Overlays.Mods.Input modState.Active.Toggle(); return true; } - - public bool HandlePresetHotkeyPressed(KeyDownEvent e, IEnumerable availablePresets) - { - int index = Array.IndexOf(toggleKeys, e.Key); - if (index < 0) - return false; - - var panel = availablePresets.ElementAtOrDefault(index); - if (panel == null) - return false; - - panel.Toggle(); - - return true; - } } }