mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add processing overlay to room creation process
This commit is contained in:
@ -76,7 +76,7 @@ namespace osu.Game.Tests.Visual
|
||||
public readonly BindableCollection<Room> Rooms = new BindableCollection<Room>();
|
||||
IBindableCollection<Room> IRoomManager.Rooms => Rooms;
|
||||
|
||||
public void CreateRoom(Room room, Action<string> onError = null) => Rooms.Add(room);
|
||||
public void CreateRoom(Room room, Action onSuccess = null, Action<string> onError = null) => Rooms.Add(room);
|
||||
|
||||
public void JoinRoom(Room room) => RoomJoined?.Invoke(room);
|
||||
|
||||
|
@ -140,13 +140,15 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
public IBindableCollection<Room> Rooms { get; } = null;
|
||||
|
||||
public void CreateRoom(Room room, Action<string> onError = null)
|
||||
public void CreateRoom(Room room, Action onSuccess = null, Action<string> onError = null)
|
||||
{
|
||||
if (CreateRequested == null)
|
||||
return;
|
||||
|
||||
if (!CreateRequested.Invoke(room))
|
||||
onError?.Invoke(FAILED_TEXT);
|
||||
else
|
||||
onSuccess?.Invoke();
|
||||
}
|
||||
|
||||
public void JoinRoom(Room room) => throw new NotImplementedException();
|
||||
|
Reference in New Issue
Block a user