1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:13:21 +08:00

Better signify private rooms by showing a different status pill design

This commit is contained in:
Dean Herbert 2024-05-03 17:11:29 +08:00
parent 42e49067e5
commit 7141177966
No known key found for this signature in database
3 changed files with 17 additions and 1 deletions

View File

@ -396,7 +396,7 @@ namespace osu.Game.Online.Multiplayer
switch (state)
{
case MultiplayerRoomState.Open:
APIRoom.Status.Value = new RoomStatusOpen();
APIRoom.Status.Value = APIRoom.HasPassword.Value ? new RoomStatusOpenPrivate() : new RoomStatusOpen();
break;
case MultiplayerRoomState.Playing:

View File

@ -46,6 +46,8 @@ namespace osu.Game.Online.Rooms
{
if (room.EndDate.Value != null && DateTimeOffset.Now >= room.EndDate.Value)
room.Status.Value = new RoomStatusEnded();
else if (room.HasPassword.Value)
room.Status.Value = new RoomStatusOpenPrivate();
else
room.Status.Value = new RoomStatusOpen();
}

View File

@ -0,0 +1,14 @@
// 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.Game.Graphics;
using osuTK.Graphics;
namespace osu.Game.Online.Rooms.RoomStatuses
{
public class RoomStatusOpenPrivate : RoomStatus
{
public override string Message => "Open (Private)";
public override Color4 GetAppropriateColour(OsuColour colours) => colours.GreenDark;
}
}