mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 09:03:01 +08:00
Visual test for KeyCounter.
This commit is contained in:
parent
16f1dff849
commit
4b459b4f67
32
osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs
Normal file
32
osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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();
|
||||||
|
|
||||||
|
KeyCounter kc = new KeyCounter
|
||||||
|
{
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
IsCounting = true
|
||||||
|
};
|
||||||
|
Add(kc);
|
||||||
|
kc.AddKey(new KeyBoardCount(@"Z", Key.Z));
|
||||||
|
kc.AddKey(new KeyBoardCount(@"X", Key.X));
|
||||||
|
kc.AddKey(new MouseCount(@"M1", MouseButton.Left));
|
||||||
|
kc.AddKey(new MouseCount(@"M2", MouseButton.Right));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -147,6 +147,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Tests\TestCaseKeyCounter.cs" />
|
||||||
<Compile Include="Tests\TestCaseTextAwesome.cs" />
|
<Compile Include="Tests\TestCaseTextAwesome.cs" />
|
||||||
<Compile Include="VisualTestGame.cs" />
|
<Compile Include="VisualTestGame.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user