Open -> Push

This commit is contained in:
Dean Herbert 2018-12-26 20:21:30 +09:00
parent 6f0d13e36b
commit 5bd3ab51dd
2 changed files with 7 additions and 4 deletions

View File

@ -78,7 +78,7 @@ public LoungeSubScreen(Action<Screen> pushGameplayScreen)
private void load()
{
if (roomManager != null)
roomManager.RoomJoined += Open;
roomManager.RoomJoined += Push;
}
protected override void UpdateAfterChildren()
@ -123,7 +123,10 @@ private void filterRooms()
roomManager?.Filter(Filter.CreateCriteria());
}
public void Open(Room room)
/// <summary>
/// Push a room as a new subscreen.
/// </summary>
public void Push(Room room)
{
// Handles the case where a room is clicked 3 times in quick succession
if (!IsCurrentScreen)
@ -137,7 +140,7 @@ protected override void Dispose(bool isDisposing)
base.Dispose(isDisposing);
if (roomManager != null)
roomManager.RoomJoined -= Open;
roomManager.RoomJoined -= Push;
}
}
}

View File

@ -86,7 +86,7 @@ public Multiplayer()
Right = 10,
},
Text = "Create room",
Action = () => loungeSubScreen.Open(new Room
Action = () => loungeSubScreen.Push(new Room
{
Name = { Value = $"{api.LocalUser}'s awesome room" }
}),