예제 #1
0
        private void AddMessage(EB.Sparx.ChatMessage msg)
        {
            ChatItem item = Use();

            ChatUIMessage uimsg   = new ChatUIMessage(msg);
            var           channel = ChatRule.STR2CHANNEL[msg.channelType];

            uimsg.Channel           = channel;
            uimsg.ChannelSpriteName = ChatRule.CHANNEL2ICON.ContainsKey(channel) ? ChatRule.CHANNEL2ICON[channel] : "";
            item.SetItemData(uimsg);
        }
예제 #2
0
        private void AddMessage(EB.Sparx.ChatMessage msg)
        {
            if (msg == null)
            {
                return;
            }

            ChatUIMessage uimsg   = new ChatUIMessage(msg);
            var           channel = ChatRule.STR2CHANNEL[msg.channelType];

            uimsg.ChannelSpriteName = ChatRule.CHANNEL2ICON.ContainsKey(channel) ? ChatRule.CHANNEL2ICON[channel] : "";
            uimsg.Channel           = channel;
        }
예제 #3
0
        private void AddMessagesCoroutine(EB.Sparx.ChatMessage[] msgs)
        {
            ChatUIMessage[] uiMsgs = new ChatUIMessage[msgs.Length];
            for (int i = 0; i < msgs.Length; ++i)
            {
                uiMsgs[i] = new ChatUIMessage(msgs[i]);

                ChatRule.CHAT_CHANNEL channel = ChatRule.STR2CHANNEL[msgs[i].channelType];
                uiMsgs[i].Channel           = channel;
                uiMsgs[i].ChannelSpriteName =
                    ChatRule.CHANNEL2ICON.ContainsKey(channel) ? ChatRule.CHANNEL2ICON[channel] : "";
            }

            if (mActive.Count == 0 && mPool.Count == 0)
            {
                SetChatItem();
            }

            TabDynaScroll.SetItemData(uiMsgs, MaxHistoryCount);
        }