mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Fix typo and missnaming.
This commit is contained in:
30
osu.Game/Graphics/UserInterface/KeyCounterKeyboard.cs
Normal file
30
osu.Game/Graphics/UserInterface/KeyCounterKeyboard.cs
Normal file
@ -0,0 +1,30 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class KeyCounterKeyboard : KeyCounter
|
||||
{
|
||||
public Key Key { get; }
|
||||
public KeyCounterKeyboard(string name, Key key) : base(name)
|
||||
{
|
||||
Key = key;
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
{
|
||||
if (args.Key == this.Key) IsLit = true;
|
||||
return base.OnKeyDown(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnKeyUp(InputState state, KeyUpEventArgs args)
|
||||
{
|
||||
if (args.Key == this.Key) IsLit = false;
|
||||
return base.OnKeyUp(state, args);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user