1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 14:57:25 +08:00
osu-lazer/osu.Game/Overlays/Mods/Input/IModHotkeyHandler.cs
Bartłomiej Dach 234120ff43
Forward entire event to IModHotkeyHandler
Required for shift handling in the classic implementation.
2022-06-21 13:37:17 +02:00

23 lines
986 B
C#

// 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 osu.Framework.Input.Events;
namespace osu.Game.Overlays.Mods.Input
{
/// <summary>
/// Encapsulates strategies of handling mod hotkeys on the <see cref="ModSelectOverlay"/>.
/// </summary>
public interface IModHotkeyHandler
{
/// <summary>
/// Attempt to handle the supplied <see cref="KeyDownEvent"/> as a selection of one of the mods in <paramref name="availableMods"/>.
/// </summary>
/// <param name="e">The event representing the user's keypress.</param>
/// <param name="availableMods">The list of currently available mods.</param>
/// <returns>Whether the supplied event was handled as a mod selection/deselection.</returns>
bool HandleHotkeyPressed(KeyDownEvent e, IEnumerable<ModState> availableMods);
}
}