Move listing polling component to LoungeSubScreen

This commit is contained in:
smoogipoo
2021-08-13 17:39:09 +09:00
parent df24f7a81e
commit 8910781bcd
19 changed files with 308 additions and 451 deletions

View File

@ -33,10 +33,10 @@ namespace osu.Game.Tests.Visual.OnlinePlay
room.RoomID.Value ??= Rooms.Select(r => r.RoomID.Value).Where(id => id != null).Select(id => id.Value).DefaultIfEmpty().Max() + 1;
onSuccess?.Invoke(room);
AddRoom(room);
AddOrUpdateRoom(room);
}
public void AddRoom(Room room)
public void AddOrUpdateRoom(Room room)
{
Rooms.Add(room);
RoomsUpdated?.Invoke();
@ -48,6 +48,12 @@ namespace osu.Game.Tests.Visual.OnlinePlay
RoomsUpdated?.Invoke();
}
public void ClearRooms()
{
Rooms.Clear();
RoomsUpdated?.Invoke();
}
public void JoinRoom(Room room, string password, Action<Room> onSuccess = null, Action<string> onError = null)
{
JoinRoomRequested?.Invoke(room, password);