예제 #1
0
        public void Undock(ChatChannelUI channelUI)
        {
            Channels.Remove(channelUI);
            channelUI.transform.SetParent(null, false);

            CleanupMissing();
        }
예제 #2
0
        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();
        }
예제 #3
0
 public bool IsDocked(ChatChannelUI channelUI)
 {
     return(channelUI != null && channelUI.gameObject != null && Channels.Contains(channelUI) &&
            channelUI.transform.parent == ChannelsContainer);
 }
예제 #4
0
 public void Activate(ChatChannelUI channelUI)
 {
     ActiveChannel = channelUI;
 }
예제 #5
0
 public void OnUnsubscribed()
 {
     ChatChannelUI.OnUnsubscribed();
 }
예제 #6
0
 public void OnUpdateMessages(string[] senders, object[] messages)
 {
     ChatChannelUI.OnUpdateMessages(messages, senders);
 }