using UnityEngine; using UnityEngine.UI; using System.Collections; using Games.Item; using GCGame; using GCGame.Table; using Games.ChatHistory; public class ChatLinkOpenUI : ChatLinkItem { private static string _InputTeamStr = StrDictionary.GetClientDictionaryString("#{5138}"); private string _UIName; private string _ShowText; public void SetLinkOpenUI(string uiName, string showText) { _UIName = uiName; _ShowText = showText; StrInput = showText; StrSend = StrSendStart + ((int)ChatLinkType.SelfPos).ToString() + StrSplit + _UIName + StrSplit + _ShowText + StrSendEnd; } public override void SetLinkBySendStr(Text text, ChatHistoryItem chatHistory, string linkStr, string[] linkParams) { StrSend = linkStr; StrInput = linkStr; if (linkParams.Length != 3) return; _UIName = (linkParams[1]); _ShowText = (linkParams[2]); StrShow = _ShowText; } protected override void LinkClick(int linkindex) { if (_UIName == UIInfo.GuanningRegistRoot.name) { GuanningRegistLogic.InitGuanningRegist(); } else if (UIPathData.m_DicUIName.ContainsKey(_UIName)) { UIManager.ShowUI(UIPathData.m_DicUIName[_UIName]); } } }