2016-09-24 08:57:13 +08:00
|
|
|
|
using System;
|
|
|
|
|
using OpenTK.Input;
|
|
|
|
|
using osu.Framework.GameModes.Testing;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
|
|
|
|
|
namespace osu.Desktop.Tests
|
|
|
|
|
{
|
|
|
|
|
class TestCaseKeyCounter : TestCase
|
|
|
|
|
{
|
|
|
|
|
public override string Name => @"KeyCounter";
|
|
|
|
|
|
|
|
|
|
public override string Description => @"Tests key counter";
|
|
|
|
|
|
|
|
|
|
public override void Reset()
|
|
|
|
|
{
|
|
|
|
|
base.Reset();
|
|
|
|
|
|
2016-09-24 09:53:58 +08:00
|
|
|
|
KeyCounterCollection kc = new KeyCounterCollection
|
2016-09-24 08:57:13 +08:00
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
IsCounting = true
|
|
|
|
|
};
|
|
|
|
|
Add(kc);
|
2016-09-24 14:28:59 +08:00
|
|
|
|
kc.AddKey(new KeyCounterKeyboard(@"Z", Key.Z));
|
|
|
|
|
kc.AddKey(new KeyCounterKeyboard(@"X", Key.X));
|
2016-09-24 09:53:58 +08:00
|
|
|
|
kc.AddKey(new KeyCounterMouse(@"M1", MouseButton.Left));
|
|
|
|
|
kc.AddKey(new KeyCounterMouse(@"M2", MouseButton.Right));
|
2016-09-24 08:57:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|