58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
using UnityEngine.UI;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
// 累计充值菜单Item
|
|||
|
public class RechargeMenuItem : UIItemSelect {
|
|||
|
|
|||
|
public Text desc; // 按钮描述
|
|||
|
public GameObject redPoint; // 红点
|
|||
|
public MarketingActPacketSubTag info; // 数据
|
|||
|
public int index = 0; // 菜单索引,用于更新活动的充值数字
|
|||
|
public Text hlDesc;
|
|||
|
|
|||
|
public override void Show(Hashtable menuInfo)
|
|||
|
{
|
|||
|
info = (MarketingActPacketSubTag)menuInfo["InitObj"];
|
|||
|
if(info != null)
|
|||
|
{
|
|||
|
InitItem(info);
|
|||
|
base.Show();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void InitItem(MarketingActPacketSubTag info)
|
|||
|
{
|
|||
|
if(desc != null)
|
|||
|
{
|
|||
|
if(!string.IsNullOrEmpty(info.btnDesc))
|
|||
|
{
|
|||
|
desc.text = StrDictionary.GetServerDictionaryFormatString(info.btnDesc);
|
|||
|
if(hlDesc != null)
|
|||
|
{
|
|||
|
hlDesc.text = desc.text;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if(redPoint != null)
|
|||
|
{
|
|||
|
redPoint.SetActive(info.state == 1);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public override void OnItemClick()
|
|||
|
{
|
|||
|
if(_ClickEvent != null)
|
|||
|
{
|
|||
|
_ClickEvent(this);
|
|||
|
}
|
|||
|
|
|||
|
if(_PanelClickEvent != null)
|
|||
|
{
|
|||
|
_PanelClickEvent(this);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|