mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Set up flow for switching between hotkey styles
This commit is contained in:
16
osu.Game/Overlays/Mods/Input/ClassicModHotkeyHandler.cs
Normal file
16
osu.Game/Overlays/Mods/Input/ClassicModHotkeyHandler.cs
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Overlays.Mods.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// Uses bindings from stable 1:1.
|
||||
/// </summary>
|
||||
public class ClassicModHotkeyHandler : IModHotkeyHandler
|
||||
{
|
||||
public bool HandleHotkeyPressed(Key hotkey, IEnumerable<ModState> availableMods) => false; // TODO
|
||||
}
|
||||
}
|
@ -13,14 +13,16 @@ namespace osu.Game.Overlays.Mods.Input
|
||||
/// <summary>
|
||||
/// Creates an appropriate <see cref="IModHotkeyHandler"/> for the given <paramref name="modType"/>.
|
||||
/// </summary>
|
||||
public static IModHotkeyHandler Create(ModType modType)
|
||||
public static IModHotkeyHandler Create(ModType modType, ModSelectHotkeyStyle style)
|
||||
{
|
||||
switch (modType)
|
||||
{
|
||||
case ModType.DifficultyReduction:
|
||||
case ModType.DifficultyIncrease:
|
||||
case ModType.Automation:
|
||||
return SequentialModHotkeyHandler.Create(modType);
|
||||
return style == ModSelectHotkeyStyle.Sequential
|
||||
? (IModHotkeyHandler)SequentialModHotkeyHandler.Create(modType)
|
||||
: new ClassicModHotkeyHandler();
|
||||
|
||||
default:
|
||||
return new NoopModHotkeyHandler();
|
||||
|
Reference in New Issue
Block a user