public void Undock(ChatChannelUI channelUI) { Channels.Remove(channelUI); channelUI.transform.SetParent(null, false); CleanupMissing(); }
public void Dock(ChatChannelUI channelUI, bool focus = true) { if (!Channels.Contains(channelUI)) { Channels.Add(channelUI); } if (IsToolbarAvailable) { if (!_channelToolbarButtons.Exists(x => x.ChannelUI == channelUI)) { var toolbarButton = Instantiate(DockToolbarButtonPrefab); toolbarButton.ChannelUI = channelUI; toolbarButton.transform.SetParent(DockToolbar.transform, false); toolbarButton.transform.SetAsFirstSibling(); _channelToolbarButtons.Add(toolbarButton); } } channelUI.transform.SetParent(ChannelsContainer, false); if (focus) { Activate(channelUI); } RefreshDisplayName(); }
public bool IsDocked(ChatChannelUI channelUI) { return(channelUI != null && channelUI.gameObject != null && Channels.Contains(channelUI) && channelUI.transform.parent == ChannelsContainer); }
public void Activate(ChatChannelUI channelUI) { ActiveChannel = channelUI; }
public void OnUnsubscribed() { ChatChannelUI.OnUnsubscribed(); }
public void OnUpdateMessages(string[] senders, object[] messages) { ChatChannelUI.OnUpdateMessages(messages, senders); }