Files
JJBB/Assets/Project/Script/GUI/Chat/ChatInfoLogItemRedPacket.cs
2024-08-23 15:49:34 +08:00

45 lines
1.3 KiB
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;
using Games.Item;
public class ChatInfoLogItemRedPacket : ChatInfoLogItem
{
public const string RED_PACKET_CHAT_START = "[#RedPacket";
public override float GetItemHeight()
{
return _ChatInfo.preferredHeight + 25;
}
protected override bool SetDetailLog()
{
if (_ChatHistory._RedPacketType == (int)GC_GIVE_RED_PACKET_RET.ERedPacketType.ETypeSystem)
{
_ChatHistory.SenderIcon = Utils.GetSysIconName(Utils.SysIconType.AI);
}
return base.SetDetailLog();
}
protected override void SetBGWidth()
{
base.SetBGWidth();
//_ChatInfoBG.rectTransform.sizeDelta = new Vector2(_ChatInfoBG.rectTransform.sizeDelta.x, Math.Max(77, _ChatInfo.preferredHeight + 50));
//_LayoutElement.minHeight = _ChatInfoBG.rectTransform.sizeDelta.y + 90;
//_LayoutElement.minWidth = gameObject.GetComponent<RectTransform>().sizeDelta.x;
}
public void OnBtnClickRedPacket()
{
RedPacket.Instance.PickRedPacket(_ChatHistory._RedPacketID, _ChatHistory._RedPacketType);
}
}