2016-09-26 13:56:05 +08:00
|
|
|
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2016-09-24 08:57:13 +08:00
|
|
|
|
using osu.Framework.GameModes.Testing;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2016-10-26 16:26:26 +08:00
|
|
|
|
using OpenTK.Input;
|
2016-09-24 08:57:13 +08:00
|
|
|
|
|
2016-10-26 16:26:26 +08:00
|
|
|
|
namespace osu.Desktop.VisualTests.Tests
|
2016-09-24 08:57:13 +08:00
|
|
|
|
{
|
|
|
|
|
class TestCaseKeyCounter : TestCase
|
|
|
|
|
{
|
|
|
|
|
public override string Name => @"KeyCounter";
|
|
|
|
|
|
|
|
|
|
public override string Description => @"Tests key counter";
|
|
|
|
|
|
|
|
|
|
public override void Reset()
|
|
|
|
|
{
|
|
|
|
|
base.Reset();
|
|
|
|
|
|
2016-10-09 17:55:38 +08:00
|
|
|
|
Children = new[]
|
2016-09-24 08:57:13 +08:00
|
|
|
|
{
|
2016-10-09 17:55:38 +08:00
|
|
|
|
new KeyCounterCollection
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
IsCounting = true,
|
2016-12-03 15:58:27 +08:00
|
|
|
|
Children = new KeyCounter[]
|
2016-10-09 17:55:38 +08:00
|
|
|
|
{
|
|
|
|
|
new KeyCounterKeyboard(@"Z", Key.Z),
|
|
|
|
|
new KeyCounterKeyboard(@"X", Key.X),
|
|
|
|
|
new KeyCounterMouse(@"M1", MouseButton.Left),
|
|
|
|
|
new KeyCounterMouse(@"M2", MouseButton.Right),
|
|
|
|
|
},
|
|
|
|
|
},
|
2016-09-24 08:57:13 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|