mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Remove realtime room category, fix end-date showing for realtime
This commit is contained in:
parent
6469eaa427
commit
1fd746524d
@ -108,12 +108,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
EndDate = { Value = DateTimeOffset.Now },
|
||||
}),
|
||||
createDrawableRoom(new Room
|
||||
{
|
||||
Name = { Value = "Room 4 (realtime)" },
|
||||
Status = { Value = new RoomStatusOpen() },
|
||||
Category = { Value = RoomCategory.Realtime },
|
||||
}),
|
||||
createDrawableRoom(new Room
|
||||
{
|
||||
Name = { Value = "Room 4 (spotlight)" },
|
||||
Status = { Value = new RoomStatusOpen() },
|
||||
@ -134,7 +128,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
Name = { Value = "Room with password" },
|
||||
Status = { Value = new RoomStatusOpen() },
|
||||
Category = { Value = RoomCategory.Realtime },
|
||||
Type = { Value = MatchType.HeadToHead },
|
||||
}));
|
||||
|
||||
AddAssert("password icon hidden", () => Precision.AlmostEquals(0, drawableRoom.ChildrenOfType<DrawableRoom.PasswordProtectedIcon>().Single().Alpha));
|
||||
|
@ -8,6 +8,5 @@ namespace osu.Game.Online.Rooms
|
||||
// used for osu-web deserialization so names shouldn't be changed.
|
||||
Normal,
|
||||
Spotlight,
|
||||
Realtime,
|
||||
}
|
||||
}
|
||||
|
@ -34,12 +34,14 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
|
||||
protected Container ButtonsContainer { get; private set; }
|
||||
|
||||
private readonly Bindable<MatchType> roomType = new Bindable<MatchType>();
|
||||
private readonly Bindable<RoomCategory> roomCategory = new Bindable<RoomCategory>();
|
||||
private readonly Bindable<bool> hasPassword = new Bindable<bool>();
|
||||
|
||||
private RecentParticipantsList recentParticipantsList;
|
||||
private RoomSpecialCategoryPill specialCategoryPill;
|
||||
private PasswordProtectedIcon passwordIcon;
|
||||
private EndDateInfo endDateInfo;
|
||||
|
||||
public DrawableRoom(Room room)
|
||||
{
|
||||
@ -144,10 +146,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
},
|
||||
new EndDateInfo
|
||||
endDateInfo = new EndDateInfo
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
Origin = Anchor.CentreLeft,
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -238,6 +240,12 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
specialCategoryPill.Hide();
|
||||
}, true);
|
||||
|
||||
roomType.BindTo(Room.Type);
|
||||
roomType.BindValueChanged(t =>
|
||||
{
|
||||
endDateInfo.Alpha = t.NewValue == MatchType.Playlists ? 1 : 0;
|
||||
}, true);
|
||||
|
||||
hasPassword.BindTo(Room.HasPassword);
|
||||
hasPassword.BindValueChanged(v => passwordIcon.Alpha = v.NewValue ? 1 : 0, true);
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
protected override Room CreateNewRoom() => new Room
|
||||
{
|
||||
Name = { Value = $"{api.LocalUser}'s awesome room" },
|
||||
Category = { Value = RoomCategory.Realtime },
|
||||
Type = { Value = MatchType.HeadToHead },
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user