123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using UnityEngine;
- using UnityEngine.UI;
- using QFramework;
- using System.Collections.Generic;
- namespace QFramework
- {
- public class PC_PranticeResultPanelData : UIPanelData
- {
- public List<PranticeProcessElement> pranticeProcessElementsData = new List<PranticeProcessElement>();
- }
- public partial class PC_PranticeResultPanel : UIPanel
- {
- protected override void ProcessMsg(int eventId, QMsg msg)
- {
- throw new System.NotImplementedException();
- }
-
- protected override void OnInit(IUIData uiData = null)
- {
- mData = uiData as PC_PranticeResultPanelData ?? new PC_PranticeResultPanelData();
- // please add init code here
- ConfirmBtn.onClick.AddListener(OnConfirmBtnClick);
- }
-
- protected override void OnOpen(IUIData uiData = null)
- {
- mData = uiData as PC_PranticeResultPanelData ?? new PC_PranticeResultPanelData();
- foreach (var element in mData.pranticeProcessElementsData)
- {
- GameObject tmpObj = Instantiate<GameObject>(Item.gameObject, Content);
- PranticeResultItem tmpResultItem = tmpObj.GetComponent<PranticeResultItem>();
- tmpObj.SetActive(true);
- tmpResultItem.Init(element);
- }
- }
- void Update()
- {
- if (PranticeManagerForPC.instance.IsFinishUpLoad())
- {
- ConfirmBtn.GetComponentInChildren<Text>().text = "È·¶¨";
- ConfirmBtn.interactable = true;
- }
- else
- {
- ConfirmBtn.GetComponentInChildren<Text>().text = "ÕýÔÚÉÏ´«";
- ConfirmBtn.interactable = false;
- }
- }
- private void OnConfirmBtnClick()
- {
- CloseSelf();
- }
- protected override void OnShow()
- {
- }
-
- protected override void OnHide()
- {
- }
-
- protected override void OnClose()
- {
- }
- }
- }
|