A game framework written with osu! in mind.
at master 826 B view raw
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 4namespace osu.Framework.Input.StateChanges 5{ 6 /// <summary> 7 /// Denotes a button state. 8 /// </summary> 9 /// <typeparam name="TButton">Type of button.</typeparam> 10 public struct ButtonInputEntry<TButton> 11 where TButton : struct 12 { 13 /// <summary> 14 /// The button referred to. 15 /// </summary> 16 public TButton Button; 17 18 /// <summary> 19 /// Whether <see cref="Button"/> is currently pressed or not. 20 /// </summary> 21 public bool IsPressed; 22 23 public ButtonInputEntry(TButton button, bool isPressed) 24 { 25 Button = button; 26 IsPressed = isPressed; 27 } 28 } 29}