mirror of
https://github.com/ppy/osu.git
synced 2026-05-28 14:30:42 +08:00
Add visual test setup for taiko flashlight
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Taiko.Mods;
|
||||
using osu.Game.Rulesets.Taiko.UI;
|
||||
using osuTK;
|
||||
@@ -12,6 +15,34 @@ namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||
{
|
||||
public partial class TestSceneTaikoModFlashlight : TaikoModTestScene
|
||||
{
|
||||
[Test]
|
||||
public void TestAspectRatios([Values] bool withClassicMod)
|
||||
{
|
||||
if (withClassicMod)
|
||||
CreateModTest(new ModTestData { Mods = new Mod[] { new TaikoModFlashlight(), new TaikoModClassic() }, PassCondition = () => true });
|
||||
else
|
||||
CreateModTest(new ModTestData { Mod = new TaikoModFlashlight(), PassCondition = () => true });
|
||||
|
||||
AddStep("clear dim", () => LocalConfig.SetValue(OsuSetting.DimLevel, 0.0));
|
||||
|
||||
AddStep("reset", () => Stack.FillMode = FillMode.Stretch);
|
||||
AddStep("set to 16:9", () =>
|
||||
{
|
||||
Stack.FillAspectRatio = 16 / 9f;
|
||||
Stack.FillMode = FillMode.Fit;
|
||||
});
|
||||
AddStep("set to 4:3", () =>
|
||||
{
|
||||
Stack.FillAspectRatio = 4 / 3f;
|
||||
Stack.FillMode = FillMode.Fit;
|
||||
});
|
||||
AddSliderStep("aspect ratio", 0.01f, 5f, 1f, v =>
|
||||
{
|
||||
Stack.FillAspectRatio = v;
|
||||
Stack.FillMode = FillMode.Fit;
|
||||
});
|
||||
}
|
||||
|
||||
[TestCase(1f)]
|
||||
[TestCase(0.5f)]
|
||||
[TestCase(1.25f)]
|
||||
|
||||
Reference in New Issue
Block a user