49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
using GCGame.Table;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
|
|
public class PrivilegeWelfareMenuItem : MonoBehaviour, IPointerClickHandler
|
|
{
|
|
public GameObject _BGIcon;
|
|
public GameObject _MarkIcon;
|
|
public Text _BGIconVipLevelDesc;
|
|
public Text _MarkIconVipLevelDesc;
|
|
|
|
public GameObject _menuItemMarkIcon;
|
|
|
|
public int _MenuItemVipLevel = -1;
|
|
public void InitMenuItem(int vipLevel)
|
|
{
|
|
_MenuItemVipLevel = vipLevel;
|
|
_MarkIconVipLevelDesc.text = StrDictionary.GetClientDictionaryString("{#87332}", vipLevel);
|
|
_BGIconVipLevelDesc.text = StrDictionary.GetClientDictionaryString("{#87332}", vipLevel);
|
|
}
|
|
public void ShowMarkIconAndRemainTime(int state)
|
|
{
|
|
_menuItemMarkIcon.SetActive(state == 1);
|
|
}
|
|
public void OnPointerClick(PointerEventData eventData)
|
|
{
|
|
|
|
if (PrivilegePerMissionsPanelCtr.Instance && PrivilegePerMissionsPanelCtr.Instance.gameObject.activeInHierarchy)
|
|
{
|
|
PrivilegePerMissionsPanelCtr.Instance.newOnMenuItemClick(_MenuItemVipLevel);
|
|
}
|
|
if (PrivilegeWelfarePanelCtr.Instance && PrivilegeWelfarePanelCtr.Instance.gameObject.activeInHierarchy)
|
|
{
|
|
PrivilegeWelfarePanelCtr.Instance.OnMenuItemClick(_MenuItemVipLevel);
|
|
}
|
|
}
|
|
|
|
|
|
public void ShowMarkIcon(bool isShow)
|
|
{
|
|
_BGIcon.SetActive(!isShow);
|
|
_MarkIcon.SetActive(isShow);
|
|
}
|
|
}
|