46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Xml;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.UIElements;
|
|
using Button = UnityEngine.UI.Button;
|
|
using Image = UnityEngine.UI.Image;
|
|
|
|
public class GoldRecordPanel : BasePanel
|
|
{
|
|
//¹Ø±Õ
|
|
public Button btnColse;
|
|
public Image img;
|
|
public Text txt;
|
|
|
|
public ScrollRect sv;
|
|
|
|
public override void Init()
|
|
{
|
|
GameDataMgr.Instance.goldRealMsg.openId = GameDataMgr.Instance.player.openId;
|
|
|
|
StartCoroutine(NetMgr.Instance.GoldRealGet(GameDataMgr.Instance.goldRealMsg));
|
|
|
|
btnColse.onClick.AddListener(() =>
|
|
{
|
|
UIManager.Instance.HidePanel<GoldRecordPanel>();
|
|
});
|
|
}
|
|
|
|
//Òþ²ØÍ¼Æ¬ºÍÎÄ×Ö
|
|
public void UpdatePanel(List<GoldRealMsg> msg)
|
|
{
|
|
img.gameObject.SetActive(false);
|
|
txt.gameObject.SetActive(false);
|
|
|
|
for (int i = 0; i < msg.Count; i++)
|
|
{
|
|
GameObject item = Instantiate(Resources.Load<GameObject>("UI/GoldRecord"));
|
|
item.transform.SetParent(sv.content, false);
|
|
GoldRecord gold = item.GetComponent<GoldRecord>();
|
|
gold.UpdatePanel(msg[i].realRecord);
|
|
}
|
|
}
|
|
}
|