1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Add participant panel state

This commit is contained in:
smoogipoo 2021-04-07 16:40:24 +09:00
parent f5667125a0
commit c744f77cfa
2 changed files with 13 additions and 0 deletions

View File

@ -126,6 +126,13 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddUntilStep("ready mark invisible", () => !this.ChildrenOfType<StateDisplay>().Single().IsPresent);
}
[Test]
public void TestToggleSpectateState()
{
AddStep("make user spectating", () => Client.ChangeState(MultiplayerUserState.Spectating));
AddStep("make user idle", () => Client.ChangeState(MultiplayerUserState.Idle));
}
[Test]
public void TestCrownChangesStateWhenHostTransferred()
{

View File

@ -135,6 +135,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
icon.Colour = colours.BlueLighter;
break;
case MultiplayerUserState.Spectating:
text.Text = "spectating";
icon.Icon = FontAwesome.Solid.Eye;
icon.Colour = colours.BlueLight;
break;
default:
throw new ArgumentOutOfRangeException(nameof(state), state, null);
}