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:
parent
42e49067e5
commit
7141177966
@ -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:
|
||||
|
@ -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();
|
||||
}
|
||||
|
14
osu.Game/Online/Rooms/RoomStatuses/RoomStatusOpenPrivate.cs
Normal file
14
osu.Game/Online/Rooms/RoomStatuses/RoomStatusOpenPrivate.cs
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user