Files
JJBB/Assets/Project/Script/GUI/Chat/ChatLinkOpenUI.cs

51 lines
1.3 KiB
C#
Raw Permalink Normal View History

2024-08-23 15:49:34 +08:00
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]);
}
}
}