mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:42:58 +08:00
Add test for many users and disable scrollbar
This commit is contained in:
parent
1e5c32410a
commit
11a903a206
@ -92,5 +92,25 @@ namespace osu.Game.Tests.Visual.RealtimeMultiplayer
|
||||
AddUntilStep("first user crown hidden", () => this.ChildrenOfType<ParticipantPanel>().ElementAt(0).ChildrenOfType<SpriteIcon>().First().Alpha == 0);
|
||||
AddUntilStep("second user crown visible", () => this.ChildrenOfType<ParticipantPanel>().ElementAt(1).ChildrenOfType<SpriteIcon>().First().Alpha == 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestManyUsers()
|
||||
{
|
||||
AddStep("add many users", () =>
|
||||
{
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
Client.AddUser(new User
|
||||
{
|
||||
Id = i,
|
||||
Username = $"User {i}",
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
||||
});
|
||||
|
||||
if (i % 2 == 0)
|
||||
Client.ChangeUserState(i, MultiplayerUserState.Ready);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Participants
|
||||
Child = new OsuScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
Child = panels = new FillFlowContainer<ParticipantPanel>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
Loading…
Reference in New Issue
Block a user