mirror of
https://github.com/ppy/osu.git
synced 2026-05-27 02:09:54 +08:00
ee2f7a75d7
This was mentioned in vivi's feedback. Basically now the card backside is always loaded and there, rather than faffing with switching the content around. > Cards have a stale grey background when they are spawning in before they get changed into the cards they’re supposed to be. This can be changed to the backside of the card or maybe a bright white card. Makes it look less placeholdery. Keeping it simple for now. Can probably hide it when not in use in the future.
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
// 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.Extensions;
|
|
using osu.Game.Online.API;
|
|
using osu.Game.Online.Multiplayer;
|
|
using osu.Game.Online.Multiplayer.MatchTypes.RankedPlay;
|
|
using osu.Game.Online.Rooms;
|
|
using osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay;
|
|
|
|
namespace osu.Game.Tests.Visual.RankedPlay
|
|
{
|
|
public partial class TestSceneDiscardScreen : RankedPlayTestScene
|
|
{
|
|
private RankedPlayScreen screen = null!;
|
|
|
|
public override void SetUpSteps()
|
|
{
|
|
base.SetUpSteps();
|
|
|
|
AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.RankedPlay)));
|
|
WaitForJoined();
|
|
|
|
AddStep("add other user", () => MultiplayerClient.AddUser(new MultiplayerRoomUser(2)));
|
|
|
|
AddStep("load screen", () => LoadScreen(screen = new RankedPlayScreen(MultiplayerClient.ClientRoom!)));
|
|
AddUntilStep("screen loaded", () => screen.IsLoaded);
|
|
|
|
var requestHandler = new BeatmapRequestHandler();
|
|
|
|
AddStep("setup request handler", () => ((DummyAPIAccess)API).HandleRequest = requestHandler.HandleRequest);
|
|
|
|
AddStep("set pick state", () => MultiplayerClient.RankedPlayChangeStage(RankedPlayStage.CardDiscard).WaitSafely());
|
|
|
|
AddWaitStep("wait some", 5);
|
|
|
|
AddStep("reveal cards", () =>
|
|
{
|
|
for (int i = 0; i < 5; i++)
|
|
{
|
|
int i2 = i;
|
|
MultiplayerClient.RankedPlayRevealCard(hand => hand[i2], new MultiplayerPlaylistItem
|
|
{
|
|
ID = i2,
|
|
BeatmapID = requestHandler.Beatmaps[i2].OnlineID
|
|
}).WaitSafely();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|