public void ShowChange()
    {
        if (this.m_btChat.Visible)
        {
            this.OnClickChatMode(this.m_btChat);
        }
        else if (this.m_btCharinfo.Visible)
        {
            if (!TsPlatform.IsMobile)
            {
                MainChatDlg mainChatDlg = (MainChatDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG);

                if (mainChatDlg != null && mainChatDlg.IsChatFocused())
                {
                    return;
                }
            }
            else
            {
                ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = (ChatMobile_Sub_Dlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MOBILE_SUB_DLG);

                if (chatMobile_Sub_Dlg != null && chatMobile_Sub_Dlg.IsChatFocused())
                {
                    return;
                }
            }
            this.OnClickCharinfoMode(this.m_btCharinfo);
        }
    }
Beispiel #2
0
    public static bool AddItemLink(ITEM _item)
    {
        if (TsPlatform.IsWeb)
        {
            MainChatDlg mainChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as MainChatDlg;

            if (mainChatDlg == null)
            {
                return(false);
            }
            mainChatDlg.AddItemLinkText(_item);
        }
        else if (TsPlatform.IsMobile)
        {
            ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MOBILE_SUB_DLG) as ChatMobile_Sub_Dlg;

            if (chatMobile_Sub_Dlg != null)
            {
                chatMobile_Sub_Dlg.AddItemLinkText(_item);
            }
            ChatMobileDlg chatMobileDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as ChatMobileDlg;

            if (chatMobileDlg == null)
            {
                return(false);
            }
            chatMobileDlg.AddItemLinkText(_item);
        }
        return(true);
    }
Beispiel #3
0
    public static void NPCTellChat(string name)
    {
        if (TsPlatform.IsWeb)
        {
            MainChatDlg mainChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as MainChatDlg;

            if (mainChatDlg != null)
            {
                mainChatDlg.NPCTellChat(name);
            }
        }
        else if (TsPlatform.IsMobile)
        {
            ChatMobileDlg chatMobileDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as ChatMobileDlg;

            if (chatMobileDlg != null)
            {
                chatMobileDlg.NPCTellChat(name);
            }
            ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MOBILE_SUB_DLG) as ChatMobile_Sub_Dlg;

            if (chatMobile_Sub_Dlg != null)
            {
                chatMobile_Sub_Dlg.NPCTellChat(name);
            }
            TournamentLobbyDlg tournamentLobbyDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.TOURNAMENT_LOBBY_DLG) as TournamentLobbyDlg;

            if (tournamentLobbyDlg != null)
            {
                tournamentLobbyDlg.NPCTellChat(name);
            }
        }
    }
Beispiel #4
0
    public static void AddChatText(string strdata)
    {
        if (TsPlatform.IsWeb)
        {
            MainChatDlg mainChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as MainChatDlg;

            if (mainChatDlg != null)
            {
                mainChatDlg.AddChatText(strdata);
            }
        }
        else if (TsPlatform.IsMobile)
        {
            ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MOBILE_SUB_DLG) as ChatMobile_Sub_Dlg;

            if (chatMobile_Sub_Dlg != null)
            {
                chatMobile_Sub_Dlg.AddChatText(strdata);
            }
        }
    }
Beispiel #5
0
    public static int GetSelectTap()
    {
        if (TsPlatform.IsWeb)
        {
            MainChatDlg mainChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as MainChatDlg;

            if (mainChatDlg != null)
            {
                return((int)mainChatDlg.GetSelectTab());
            }
        }
        else if (TsPlatform.IsMobile)
        {
            ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MOBILE_SUB_DLG) as ChatMobile_Sub_Dlg;

            if (chatMobile_Sub_Dlg != null)
            {
                return((int)chatMobile_Sub_Dlg.GetSelectTab());
            }
        }
        return(-1);
    }
    public override void SetComponent()
    {
        this._btKeyboard = (base.GetControl("Button_Input") as Button);
        Button expr_1C = this._btKeyboard;

        expr_1C.Click  = (EZValueChangedDelegate)Delegate.Combine(expr_1C.Click, new EZValueChangedDelegate(this.OnClickKeyboard));
        this._dtChatBG = (base.GetControl("DrawTexture_ChatBG") as DrawTexture);
        base.SetLocation(0f, GUICamera.height - base.GetSizeY());
        Vector2 vPos = new Vector2(this._dtChatBG.GetSize().x, 0f);

        this._clChat       = ChatManager.MakeChatLabel(this, "ChatLabel_Allchat", vPos);
        this._clChatAll    = ChatManager.MakeChatLabel(this, "ChatLabel_Allchat", vPos);
        this._clChatGuild  = ChatManager.MakeChatLabel(this, "ChatLabel_Guildchat", vPos);
        this._clChatSystem = ChatManager.MakeChatLabel(this, "ChatLabel_Systemchat", vPos);
        this._clChat.RemoveBoxCollider();
        base.ShowLayer(1);
        ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.CHAT_MOBILE_SUB_DLG) as ChatMobile_Sub_Dlg;

        if (chatMobile_Sub_Dlg != null)
        {
            chatMobile_Sub_Dlg.Hide();
        }
    }
Beispiel #7
0
    public void ClickShare(IUIObject obj)
    {
        if (0L >= this.m_nReplayUnique || 0 >= this.m_nType)
        {
            return;
        }
        if (this.m_kShareChat.StateNum == 0 && this.m_kShareStoryChat.StateNum == 0)
        {
            return;
        }
        string text = string.Empty;

        if (this.m_nType == 1)
        {
            text = NrLinkText.PlunDerReplayName(this.m_nReplayUnique);
        }
        else if (this.m_nType == 2)
        {
            text = NrLinkText.ColosseumReplayName(this.m_nReplayUnique);
        }
        else if (this.m_nType == 3)
        {
            text = NrLinkText.InfiBattleReplayName(this.m_nReplayUnique);
        }
        else if (this.m_nType == 4)
        {
            text = NrLinkText.MineReplayName(this.m_nReplayUnique);
        }
        if (string.Empty == text)
        {
            return;
        }
        if (this.m_kShareChat.StateNum == 1)
        {
            ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.CHAT_MOBILE_SUB_DLG) as ChatMobile_Sub_Dlg;

            if (chatMobile_Sub_Dlg != null)
            {
                chatMobile_Sub_Dlg.Show();
                chatMobile_Sub_Dlg.SetInputText(text);
            }
        }
        if (this.m_kShareStoryChat.StateNum == 1)
        {
            NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.STORYCHAT_DLG);

            StoryChatSetDlg storyChatSetDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.STORYCHAT_SET_DLG) as StoryChatSetDlg;

            if (storyChatSetDlg != null)
            {
                storyChatSetDlg.SetInputText(text);
            }
        }
        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERMAIN_DLG);

        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERRECORD_DLG);

        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.COLOSSEUMMAIN_DLG);

        this.Close();
    }
Beispiel #8
0
    public void MakeChatText(Form form, CHAT_TYPE type, short colosseumGrade, string strText, ITEM linkItem)
    {
        if (type == CHAT_TYPE.SYSTEM)
        {
            type = CHAT_TYPE.NORMAL;
        }
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser != null)
        {
            char c = TKString.StringChar("/")[0];
            if (!string.IsNullOrEmpty(strText))
            {
                char[] array = strText.ToCharArray(0, 1);
                if (c.CompareTo(array[0]) == 0)
                {
                    return;
                }
            }
            ChatLabel chatLabel  = null;
            ChatLabel chatLabel2 = null;
            if (TsPlatform.IsWeb)
            {
                MainChatDlg mainChatDlg = form as MainChatDlg;
                if (mainChatDlg != null)
                {
                    chatLabel  = mainChatDlg.GetChatLable(type);
                    chatLabel2 = mainChatDlg.GetChatLable(CHAT_TYPE.ALL);
                }
            }
            else
            {
                ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = form as ChatMobile_Sub_Dlg;
                if (chatMobile_Sub_Dlg != null)
                {
                    chatLabel  = chatMobile_Sub_Dlg.GetChatLable(type);
                    chatLabel2 = chatMobile_Sub_Dlg.GetChatLable(CHAT_TYPE.ALL);
                }
            }
            string name = string.Empty;
            if (chatLabel2 != null)
            {
                name = ChatManager.GetChatFrontString(nrCharUser.GetCharName(), colosseumGrade, type, false);
                chatLabel2.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem);
                if (null != chatLabel && type != CHAT_TYPE.NORMAL)
                {
                    chatLabel.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem);
                }
            }
            if (TsPlatform.IsMobile)
            {
                ChatMobileDlg chatMobileDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as ChatMobileDlg;

                if (chatMobileDlg != null)
                {
                    chatLabel2 = chatMobileDlg.GetChatLable(CHAT_TYPE.ALL);
                    if (chatLabel2 != null)
                    {
                        chatLabel2.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem);
                    }
                    if (80 <= this.ChatMsgList.Count)
                    {
                        this.ChatMsgList.Dequeue();
                    }
                    this.ChatMsgList.Enqueue(new MainChatMsg(type, ChatManager.GetChatNameStr(nrCharUser.GetCharName(), colosseumGrade, false), strText, linkItem, ChatManager.GetChatColorKey(type)));
                }
                TournamentLobbyDlg tournamentLobbyDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.TOURNAMENT_LOBBY_DLG) as TournamentLobbyDlg;

                if (tournamentLobbyDlg != null)
                {
                    chatLabel2 = tournamentLobbyDlg.GetChatLable(CHAT_TYPE.ALL);
                    if (chatLabel2 != null)
                    {
                        chatLabel2.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem);
                    }
                }
            }
            nrCharUser.MakeChatText(strText, true);
        }
    }