2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2022-02-20 22:03:21 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
2022-02-21 01:10:30 +08:00
|
|
|
|
using System.Linq;
|
2022-02-20 22:03:21 +08:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
using osu.Game.Overlays;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.UserInterface
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneShearedOverlayHeader : OsuTestScene
|
2022-02-20 22:03:21 +08:00
|
|
|
|
{
|
|
|
|
|
[Cached]
|
|
|
|
|
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);
|
|
|
|
|
|
|
|
|
|
[Test]
|
2022-04-20 14:50:57 +08:00
|
|
|
|
public void TestShearedOverlayHeader()
|
2022-02-20 22:03:21 +08:00
|
|
|
|
{
|
|
|
|
|
AddStep("create content", () =>
|
|
|
|
|
{
|
2022-04-20 14:50:57 +08:00
|
|
|
|
Child = new ShearedOverlayHeader
|
2022-02-20 22:03:21 +08:00
|
|
|
|
{
|
2022-04-20 14:50:57 +08:00
|
|
|
|
Title = "Sheared overlay header",
|
2022-02-21 01:10:30 +08:00
|
|
|
|
Description = string.Join(" ", Enumerable.Repeat("This is a description.", 20)),
|
2022-02-20 22:03:21 +08:00
|
|
|
|
Close = () => { }
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestDisabledExit()
|
|
|
|
|
{
|
|
|
|
|
AddStep("create content", () =>
|
|
|
|
|
{
|
2022-04-20 14:50:57 +08:00
|
|
|
|
Child = new ShearedOverlayHeader
|
2022-02-20 22:03:21 +08:00
|
|
|
|
{
|
2022-04-20 14:50:57 +08:00
|
|
|
|
Title = "Sheared overlay header",
|
2022-02-20 22:03:21 +08:00
|
|
|
|
Description = "This is a description."
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|