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