A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osu.Framework.Input.States;
5
6namespace osu.Framework.Input.StateChanges.Events
7{
8 public class ButtonStateChangeEvent<TButton> : InputStateChangeEvent
9 where TButton : struct
10 {
11 /// <summary>
12 /// The button which changed state.
13 /// </summary>
14 public readonly TButton Button;
15
16 /// <summary>
17 /// The kind of button state change. Either pressed or released.
18 /// </summary>
19 public readonly ButtonStateChangeKind Kind;
20
21 public ButtonStateChangeEvent(InputState state, IInput input, TButton button, ButtonStateChangeKind kind)
22 : base(state, input)
23 {
24 Button = button;
25 Kind = kind;
26 }
27 }
28}