43 lines
865 B
C#
43 lines
865 B
C#
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using Games.ChatHistory;
|
|||
|
using GCGame.Table;
|
|||
|
using Games.GlobeDefine;
|
|||
|
using GCGame;
|
|||
|
using Module.Log;
|
|||
|
|
|||
|
public class ChatShowLink : ChatShowItem
|
|||
|
{
|
|||
|
public override float GetItemWidth()
|
|||
|
{
|
|||
|
return _LinkSize.x;
|
|||
|
}
|
|||
|
public override float GetItemHeight()
|
|||
|
{
|
|||
|
return _LinkSize.y;
|
|||
|
}
|
|||
|
|
|||
|
#region
|
|||
|
|
|||
|
public Text _LinkText;
|
|||
|
public Sprite[] _MotionAnims;
|
|||
|
|
|||
|
public float _AnimTime = 0.1f;
|
|||
|
|
|||
|
private Vector2 _LinkSize;
|
|||
|
|
|||
|
public void SetLinkText(string str)
|
|||
|
{
|
|||
|
_LinkText.text = str;
|
|||
|
_LinkText.CalculateLayoutInputHorizontal();
|
|||
|
_LinkText.CalculateLayoutInputVertical();
|
|||
|
|
|||
|
_LinkSize = new Vector2(_LinkText.preferredWidth, _LinkText.preferredHeight);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|