Exemplo n.º 1
0
 protected void onBtnSendClk()
 {
     stKokChatUserCmd cmd = new stKokChatUserCmd();
     cmd.dwType = 2;
     cmd.pstrName = Ctx.m_instance.m_dataPlayer.m_dataMain.m_name;
     cmd.pstrChat = m_inputField.text;
     UtilMsg.sendMsg(cmd);
     m_inputField.text = "";              // 清空内容
 }
Exemplo n.º 2
0
        public void psstKokChatUserCmd(ByteBuffer msg)
        {
            stKokChatUserCmd cmd = new stKokChatUserCmd();
            cmd.derialize(msg);

            IUIChat uiChat = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIChat) as IUIChat;
            if(uiChat != null)
            {
                cmd.pstrChat = cmd.pstrChat.TrimEnd('\0');
                uiChat.outMsg(cmd.pstrChat);
            }
            else
            {
                Ctx.m_instance.m_dataPlayer.m_chatData.appendStr(cmd.pstrChat);
            }
        }