// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2022-01-14
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
namespace G.UI
{
using UnityEngine;
using UnityEngine.UI;
///
///
///
partial class PropListBox
{
#region Auto Generate
#pragma warning disable CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
[KUIFlag]
KUIList __listRewards;
[KUIFlag]
Button _btnClose;
#pragma warning restore CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
#endregion
#region Field
#endregion
#region Method
///
///
///
public void InitView()
{
SetViewData();
__listRewards.AddTemplate(true);
_btnClose.onClick.AddListener(this.OnCloseBtnClick);
}
///
///
///
public void RefreshView()
{
if (this.data is Item.ItemInfo[] items)
{
int count = 9;
__listRewards.Clear();
foreach (var item in items)
{
if (--count < 0)
break;
__listRewards.GetItem().SetItem(item);
}
}
}
///
///
///
public void OnCloseBtnClick()
{
CloseWindow(this);
}
#endregion
}
}