2020-01-10 13:33:00 +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 System;
|
|
|
|
|
using System.Collections.Generic;
|
2020-01-14 04:07:21 +00:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2020-01-10 13:33:00 +00:00
|
|
|
|
using osu.Game.Overlays.Rankings;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Online
|
|
|
|
|
{
|
|
|
|
|
public class TestSceneRankingsSpotlightSelector : OsuTestScene
|
|
|
|
|
{
|
|
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
|
{
|
|
|
|
|
typeof(SpotlightSelector),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public TestSceneRankingsSpotlightSelector()
|
|
|
|
|
{
|
|
|
|
|
SpotlightSelector selector;
|
|
|
|
|
|
|
|
|
|
Add(selector = new SpotlightSelector());
|
|
|
|
|
|
2020-01-14 04:07:21 +00:00
|
|
|
|
var spotlights = new APISpotlight[]
|
|
|
|
|
{
|
|
|
|
|
new APISpotlight { Name = "Spotlight 1" },
|
|
|
|
|
new APISpotlight { Name = "Spotlight 2" },
|
|
|
|
|
new APISpotlight { Name = "Spotlight 3" },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
AddStep("Load spotlights", () => selector.Spotlights = spotlights);
|
|
|
|
|
AddStep("Load info", () => selector.UpdateInfo(new APISpotlight
|
|
|
|
|
{
|
|
|
|
|
StartDate = DateTimeOffset.Now,
|
|
|
|
|
EndDate = DateTimeOffset.Now,
|
|
|
|
|
ParticipantCount = 15155151,
|
|
|
|
|
}, 18));
|
2020-01-10 13:33:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|