1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 03:55:30 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneHueAnimation.cs

47 lines
1.4 KiB
C#
Raw Normal View History

2020-06-24 20:11:38 +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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
2020-07-15 17:48:20 +08:00
using osu.Game.Graphics;
2020-06-24 20:11:38 +08:00
using osu.Game.Graphics.Sprites;
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestSceneHueAnimation : OsuTestScene
{
[BackgroundDependencyLoader]
2020-06-24 22:27:00 +08:00
private void load(LargeTextureStore textures)
2020-06-24 20:11:38 +08:00
{
2020-07-15 17:48:20 +08:00
HueAnimation anim2;
Add(anim2 = new HueAnimation
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
Texture = textures.Get("Intro/Triangles/logo-highlight"),
Colour = Colour4.White,
});
2020-06-24 20:11:38 +08:00
HueAnimation anim;
Add(anim = new HueAnimation
{
2020-06-24 22:27:00 +08:00
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
2020-07-05 01:06:26 +08:00
Texture = textures.Get("Intro/Triangles/logo-background"),
2020-07-15 17:48:20 +08:00
Colour = OsuColour.Gray(0.6f),
2020-06-24 20:11:38 +08:00
});
2020-07-15 17:48:20 +08:00
AddSliderStep("Progress", 0f, 1f, 0f, newValue =>
{
anim2.AnimationProgress = newValue;
anim.AnimationProgress = newValue;
});
2020-06-24 20:11:38 +08:00
}
}
}