2019-06-06 22:43:26 +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 osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Overlays.Profile.Header.Components;
|
2019-06-27 05:53:18 +00:00
|
|
|
|
using osu.Game.Rulesets.Catch;
|
|
|
|
|
using osu.Game.Rulesets.Mania;
|
|
|
|
|
using osu.Game.Rulesets.Osu;
|
|
|
|
|
using osu.Game.Rulesets.Taiko;
|
2019-08-04 12:00:02 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2020-01-26 14:07:17 +00:00
|
|
|
|
using osu.Game.Overlays;
|
|
|
|
|
using osu.Framework.Allocation;
|
2021-11-04 09:02:44 +00:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2022-12-30 17:03:44 +00:00
|
|
|
|
using osu.Game.Overlays.Profile;
|
2019-06-06 22:43:26 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Online
|
|
|
|
|
{
|
|
|
|
|
public partial class TestSceneProfileRulesetSelector : OsuTestScene
|
|
|
|
|
{
|
2020-01-26 14:07:17 +00:00
|
|
|
|
[Cached]
|
2022-04-29 09:40:40 +00:00
|
|
|
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
|
2020-01-26 14:07:17 +00:00
|
|
|
|
|
2019-06-06 22:43:26 +00:00
|
|
|
|
public TestSceneProfileRulesetSelector()
|
|
|
|
|
{
|
2023-01-11 18:11:40 +00:00
|
|
|
|
var user = new Bindable<UserProfileData?>();
|
2019-06-06 22:43:26 +00:00
|
|
|
|
|
2022-12-30 17:03:44 +00:00
|
|
|
|
Child = new ProfileRulesetSelector
|
2019-06-06 22:43:26 +00:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
2019-08-04 12:00:02 +00:00
|
|
|
|
User = { BindTarget = user }
|
2019-06-06 22:43:26 +00:00
|
|
|
|
};
|
2023-01-11 18:11:40 +00:00
|
|
|
|
AddStep("User on osu ruleset", () => user.Value = new UserProfileData(new APIUser { Id = 0, PlayMode = "osu" }, new OsuRuleset().RulesetInfo));
|
|
|
|
|
AddStep("User on taiko ruleset", () => user.Value = new UserProfileData(new APIUser { Id = 1, PlayMode = "osu" }, new TaikoRuleset().RulesetInfo));
|
|
|
|
|
AddStep("User on catch ruleset", () => user.Value = new UserProfileData(new APIUser { Id = 2, PlayMode = "osu" }, new CatchRuleset().RulesetInfo));
|
|
|
|
|
AddStep("User on mania ruleset", () => user.Value = new UserProfileData(new APIUser { Id = 3, PlayMode = "osu" }, new ManiaRuleset().RulesetInfo));
|
2019-06-06 22:43:26 +00:00
|
|
|
|
|
2023-01-11 18:11:40 +00:00
|
|
|
|
AddStep("User with osu as default", () => user.Value = new UserProfileData(new APIUser { Id = 0, PlayMode = "osu" }, new OsuRuleset().RulesetInfo));
|
|
|
|
|
AddStep("User with taiko as default", () => user.Value = new UserProfileData(new APIUser { Id = 1, PlayMode = "taiko" }, new OsuRuleset().RulesetInfo));
|
|
|
|
|
AddStep("User with catch as default", () => user.Value = new UserProfileData(new APIUser { Id = 2, PlayMode = "fruits" }, new OsuRuleset().RulesetInfo));
|
|
|
|
|
AddStep("User with mania as default", () => user.Value = new UserProfileData(new APIUser { Id = 3, PlayMode = "mania" }, new OsuRuleset().RulesetInfo));
|
2019-08-04 11:15:16 +00:00
|
|
|
|
|
2019-08-04 12:00:02 +00:00
|
|
|
|
AddStep("null user", () => user.Value = null);
|
2019-06-06 22:43:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|