private void RemovePlayerUI(UIEODLobbyPlayer player) { if (player.PersonButton != null) { Remove(player.PersonButton); player.PersonButton = null; } if (CaptionFunction != null) { player.Label.Caption = CaptionFunction(player, null); } }
private void UpdatePlayerUI(UIEODLobbyPlayer player, VMAvatar avatar) { if (player.PersonButton != null) { Remove(player.PersonButton); player.PersonButton = null; } player.PersonButton = new UIVMPersonButton((VMAvatar)avatar, EOD.EODController.Lot.vm, true); player.PersonButton.Position = player.Image.Position + new Microsoft.Xna.Framework.Vector2(2, 2); Add(player.PersonButton); if (CaptionFunction != null) { player.Label.Caption = CaptionFunction(player, avatar); } }
public UIEODLobby WithPlayerUI(UIEODLobbyPlayer player) { PlayerUI.Add(player); return(this); }