2022-08-15 17:23:29 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Testing;
|
|
|
|
|
using osu.Game.Rulesets.Catch.UI;
|
|
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Tests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestSceneCatchTouchInput : OsuTestScene
|
|
|
|
|
{
|
2022-09-08 18:41:04 +08:00
|
|
|
|
private CatchTouchInputMapper catchTouchInputMapper = null!;
|
2022-08-15 17:23:29 +08:00
|
|
|
|
|
|
|
|
|
[SetUpSteps]
|
|
|
|
|
public void SetUpSteps()
|
|
|
|
|
{
|
2022-09-08 18:41:04 +08:00
|
|
|
|
AddStep("create input overlay", () =>
|
2022-08-15 17:23:29 +08:00
|
|
|
|
{
|
|
|
|
|
Child = new CatchInputManager(new CatchRuleset().RulesetInfo)
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2022-09-08 18:41:04 +08:00
|
|
|
|
catchTouchInputMapper = new CatchTouchInputMapper
|
2022-08-15 17:23:29 +08:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
2022-09-09 15:12:54 +08:00
|
|
|
|
public void TestBasic()
|
2022-08-15 17:23:29 +08:00
|
|
|
|
{
|
2022-09-08 18:41:04 +08:00
|
|
|
|
AddStep("show overlay", () => catchTouchInputMapper.Show());
|
2022-08-15 17:23:29 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|