void listItem_Click(dfControl control, dfMouseEventArgs mouseEvent) { if (currentlySelected != null) { currentlySelected.BackgroundColor = new Color32(255, 255, 255, 255); currentlySelected.Find("Selected Indicator").GetComponent <dfSprite>().Hide(); } dfPanel item = control as dfPanel; RoomData data = item.GetComponent <RoomData>(); data.Selected = true; item.BackgroundColor = new Color32(0, 0, 0, 255); currentlySelected = item; currentlySelected.Find("Selected Indicator").GetComponent <dfSprite>().Show(); UpdateInfoBox(); if (data.Game.playerCount < data.Game.maxPlayers) { JoinButton.DoClick(); } }