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