A game framework written with osu! in mind.
at master 846 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 4using System.Collections.Generic; 5using osu.Framework.Input.States; 6using osuTK.Input; 7 8namespace osu.Framework.Input.StateChanges 9{ 10 public class KeyboardKeyInput : ButtonInput<Key> 11 { 12 public KeyboardKeyInput(IEnumerable<ButtonInputEntry<Key>> entries) 13 : base(entries) 14 { 15 } 16 17 public KeyboardKeyInput(Key button, bool isPressed) 18 : base(button, isPressed) 19 { 20 } 21 22 public KeyboardKeyInput(ButtonStates<Key> current, ButtonStates<Key> previous) 23 : base(current, previous) 24 { 25 } 26 27 protected override ButtonStates<Key> GetButtonStates(InputState state) => state.Keyboard.Keys; 28 } 29}