Combine all loading animation implementations

This commit is contained in:
Dean Herbert
2020-02-21 15:31:40 +09:00
parent e18d736e4a
commit 623b78d675
15 changed files with 185 additions and 225 deletions

View File

@ -8,7 +8,6 @@ using osu.Game.Overlays.Rankings.Tables;
using osu.Framework.Graphics;
using osu.Game.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Graphics.UserInterface;
using System.Threading;
using osu.Game.Online.API;
using osu.Game.Rulesets.Osu;
@ -16,6 +15,7 @@ using osu.Game.Rulesets.Mania;
using osu.Game.Rulesets.Taiko;
using osu.Game.Rulesets.Catch;
using osu.Framework.Allocation;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.Online
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual.Online
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);
private readonly BasicScrollContainer scrollFlow;
private readonly DimmedLoadingLayer loading;
private readonly LoadingLayer loading;
private CancellationTokenSource cancellationToken;
private APIRequest request;
@ -56,7 +56,7 @@ namespace osu.Game.Tests.Visual.Online
RelativeSizeAxes = Axes.Both,
Width = 0.8f,
},
loading = new DimmedLoadingLayer(),
loading = new LoadingLayer(),
};
}

View File

@ -12,8 +12,8 @@ using osu.Game.Rulesets.Mania;
using osu.Game.Users;
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Taiko;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Taiko;
namespace osu.Game.Tests.Visual.Online
{
@ -25,7 +25,7 @@ namespace osu.Game.Tests.Visual.Online
private readonly Bindable<User> user = new Bindable<User>();
private GetUserRequest request;
private readonly DimmedLoadingLayer loading;
private readonly LoadingLayer loading;
public TestSceneUserRequest()
{
@ -40,10 +40,7 @@ namespace osu.Game.Tests.Visual.Online
{
User = { BindTarget = user }
},
loading = new DimmedLoadingLayer
{
Alpha = 0
}
loading = new LoadingLayer()
}
});
}

View File

@ -1,6 +1,8 @@
// 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 System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -12,10 +14,12 @@ using osuTK.Graphics;
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestSceneProcessingOverlay : OsuTestScene
public class TestSceneLoadingLayer : OsuTestScene
{
private Drawable dimContent;
private ProcessingOverlay overlay;
private LoadingLayer overlay;
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(LoadingAnimation) };
[SetUp]
public void SetUp() => Schedule(() =>
@ -49,7 +53,7 @@ namespace osu.Game.Tests.Visual.UserInterface
new TriangleButton { Text = "puush me", Width = 200, Action = () => { } },
}
},
overlay = new ProcessingOverlay(dimContent),
overlay = new LoadingLayer(dimContent),
}
},
};