Exemplo n.º 1
0
 public override void Update()
 {
     if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MOBILE_SUB_DLG) != null)
     {
         return;
     }
     for (int i = 0; i < 7; i++)
     {
         if (0 < this._Manager.GetChatMsgCount())
         {
             MainChatMsg mainChatMsg = this._Manager.ChatMsgDequeue();
             if (string.Empty == mainChatMsg.color)
             {
                 mainChatMsg.color = ChatManager.GetChatColorKey(mainChatMsg.type);
             }
             ChatLabel chatLable = this.GetChatLable(mainChatMsg.type);
             if (null != chatLable)
             {
                 chatLable.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
             }
             this._clChatAll.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
         }
     }
     if (0 < this._Manager.GetCharChatCount())
     {
         CharChat charChat = this._Manager.CharChatDequeue();
         if (charChat.Character != null)
         {
             charChat.Character.MakeChatText(charChat.msg, true);
         }
     }
 }
Exemplo n.º 2
0
    public void PushMsg(CHAT_TYPE type, string name, string msg)
    {
        MainChatMsg item = new MainChatMsg(type, name, msg, new ITEM(), string.Empty);

        this.ChatMsgQueue.Enqueue(item);
        if (this.ChatMsgList.Count >= 80)
        {
            this.ChatMsgList.Dequeue();
        }
        this.ChatMsgList.Enqueue(item);
    }
Exemplo n.º 3
0
    public void PushSystemMsg(string name, string msg, string color)
    {
        MainChatMsg item = new MainChatMsg(CHAT_TYPE.SYSTEM, name, msg, null, color);

        this.ChatMsgQueue.Enqueue(item);
        if (this.ChatMsgList.Count >= 80)
        {
            this.ChatMsgList.Dequeue();
        }
        this.ChatMsgList.Enqueue(item);
    }
Exemplo n.º 4
0
 public void PushCharChat(NrCharBase charBase, string msg, CHAT_TYPE _ChatType)
 {
     this.CharChatQueue.Enqueue(new CharChat(charBase, msg, _ChatType));
     if (80 <= this.ChatMsgList.Count)
     {
         this.ChatMsgList.Dequeue();
     }
     if (charBase.GetCharName() == NrTSingleton <NkCharManager> .Instance.GetCharName())
     {
         MainChatMsg item = new MainChatMsg(_ChatType, charBase.GetCharName(), msg, new ITEM(), string.Empty);
         this.ChatMsgList.Enqueue(item);
     }
 }
Exemplo n.º 5
0
 private void ChatStart()
 {
     for (int i = 0; i < this._Manager.GetChatMsgListCount(); i++)
     {
         MainChatMsg chatMsgData = this._Manager.GetChatMsgData(i);
         if (string.Empty == chatMsgData.color)
         {
             chatMsgData.color = ChatManager.GetChatColorKey(chatMsgData.type);
         }
         this._clChat.PushText(chatMsgData.name, chatMsgData.msg, chatMsgData.color, chatMsgData.linkItem);
         if (chatMsgData.type == CHAT_TYPE.GUILD)
         {
             this._clChatGuild.PushText(chatMsgData.name, chatMsgData.msg, chatMsgData.color, chatMsgData.linkItem);
         }
     }
 }
Exemplo n.º 6
0
    public override void Update()
    {
        if (this.IsChatFocused() != this.bOldTextFieldFocus)
        {
            this.bOldTextFieldFocus = this.IsChatFocused();
        }
        if (0 < this._Manager.GetChatMsgCount())
        {
            MainChatMsg mainChatMsg = this._Manager.ChatMsgDequeue();
            if (string.Empty == mainChatMsg.color)
            {
                mainChatMsg.color = ChatManager.GetChatColorKey(mainChatMsg.type);
            }
            this._clChat.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
            if (mainChatMsg.type == CHAT_TYPE.GUILD)
            {
                this._clChatGuild.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
            }
            if (this.m_MainChat != null)
            {
                ChatLabel chatLable = this.m_MainChat.GetChatLable(CHAT_TYPE.ALL);
                if (chatLable != null)
                {
                    chatLable.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
                }
            }
            TournamentLobbyDlg tournamentLobbyDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.TOURNAMENT_LOBBY_DLG) as TournamentLobbyDlg;

            if (tournamentLobbyDlg != null)
            {
                ChatLabel chatLable2 = tournamentLobbyDlg.GetChatLable(CHAT_TYPE.ALL);
                if (chatLable2 != null)
                {
                    chatLable2.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
                }
            }
        }
        if (0 < this._Manager.GetCharChatCount())
        {
            CharChat charChat = this._Manager.CharChatDequeue();
            if (charChat.Character != null)
            {
                charChat.Character.MakeChatText(charChat.msg, true);
            }
        }
    }
Exemplo n.º 7
0
 public override void Update()
 {
     if (Input.imeIsSelected != this.bLanguage)
     {
         this.bLanguage = Input.imeIsSelected;
         this._dtChatLag.SetTexture((!this.bLanguage) ? "Main_I_ChatEng" : "Main_I_ChatHan");
     }
     if (this.IsChatFocused() != this.bOldTextFieldFocus)
     {
         this.bOldTextFieldFocus = this.IsChatFocused();
     }
     for (int i = 0; i < 7; i++)
     {
         if (0 < this._Manager.GetChatMsgCount())
         {
             MainChatMsg mainChatMsg = this._Manager.ChatMsgDequeue();
             if (string.Empty == mainChatMsg.color)
             {
                 mainChatMsg.color = ChatManager.GetChatColorKey(mainChatMsg.type);
             }
             ChatLabel chatLable = this.GetChatLable(mainChatMsg.type);
             if (null != chatLable)
             {
                 chatLable.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
             }
             this._clChatAll.PushText(mainChatMsg.name, mainChatMsg.msg, mainChatMsg.color, mainChatMsg.linkItem);
         }
     }
     if (0 < this._Manager.GetCharChatCount())
     {
         CharChat charChat = this._Manager.CharChatDequeue();
         if (charChat.Character != null)
         {
             charChat.Character.MakeChatText(charChat.msg, true);
         }
     }
 }