2019-09-12 02:53:18 +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.
|
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2020-02-03 17:20:35 +00:00
|
|
|
|
using osu.Framework.Allocation;
|
2019-09-12 02:53:18 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2020-02-03 17:20:35 +00:00
|
|
|
|
using osu.Game.Overlays;
|
2019-09-12 02:53:18 +00:00
|
|
|
|
using osu.Game.Overlays.Rankings;
|
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
using osu.Game.Users;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Online
|
|
|
|
|
{
|
|
|
|
|
public partial class TestSceneRankingsHeader : OsuTestScene
|
|
|
|
|
{
|
2020-02-03 17:20:35 +00:00
|
|
|
|
[Cached]
|
|
|
|
|
private readonly OverlayColourProvider overlayColour = new OverlayColourProvider(OverlayColourScheme.Green);
|
|
|
|
|
|
2019-09-12 02:53:18 +00:00
|
|
|
|
public TestSceneRankingsHeader()
|
|
|
|
|
{
|
2022-07-18 05:40:34 +00:00
|
|
|
|
var countryBindable = new Bindable<CountryCode>();
|
2019-09-12 02:53:18 +00:00
|
|
|
|
var ruleset = new Bindable<RulesetInfo>();
|
|
|
|
|
var scope = new Bindable<RankingsScope>();
|
|
|
|
|
|
2020-02-03 17:20:35 +00:00
|
|
|
|
Add(new RankingsOverlayHeader
|
2019-09-12 02:53:18 +00:00
|
|
|
|
{
|
2020-02-03 17:20:35 +00:00
|
|
|
|
Current = { BindTarget = scope },
|
2019-09-12 02:53:18 +00:00
|
|
|
|
Country = { BindTarget = countryBindable },
|
2020-02-10 23:35:23 +00:00
|
|
|
|
Ruleset = { BindTarget = ruleset }
|
2019-09-12 02:53:18 +00:00
|
|
|
|
});
|
|
|
|
|
|
2022-07-18 05:40:34 +00:00
|
|
|
|
const CountryCode country = CountryCode.BY;
|
|
|
|
|
const CountryCode unknown_country = CountryCode.CK;
|
2019-09-14 23:33:21 +00:00
|
|
|
|
|
2019-09-12 02:53:18 +00:00
|
|
|
|
AddStep("Set country", () => countryBindable.Value = country);
|
|
|
|
|
AddStep("Set scope to Score", () => scope.Value = RankingsScope.Score);
|
2022-07-16 01:40:37 +00:00
|
|
|
|
AddStep("Set country with no flag", () => countryBindable.Value = unknown_country);
|
2019-09-12 02:53:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|