70 lines
1.4 KiB
C#
70 lines
1.4 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2021-04-22
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "GetBeautyBox.View" company="Kunpo"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
namespace G.UI
|
|||
|
{
|
|||
|
using System.Collections;
|
|||
|
using TMPro;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
partial class GetBeautyBox
|
|||
|
{
|
|||
|
#region Field
|
|||
|
|
|||
|
[KUIFlag]
|
|||
|
Image _imgPicture;
|
|||
|
[KUIFlag]
|
|||
|
TextMeshProUGUI _tmpName;
|
|||
|
[KUIFlag]
|
|||
|
TextMeshProUGUI _tmpDescription;
|
|||
|
[KUIFlag]
|
|||
|
Button _btnConfirm;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public void InitView()
|
|||
|
{
|
|||
|
SetViewData();
|
|||
|
_btnConfirm.onClick.AddListener(this.OnConfirmBtnClick);
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public void RefreshView()
|
|||
|
{
|
|||
|
if (this.data is ItemBeauty beauty)
|
|||
|
{
|
|||
|
_tmpName.text = beauty.name;
|
|||
|
_tmpDescription.text = beauty.description;
|
|||
|
var skin = ItemProxy.Instance.GetStaticItem<ItemBeautySkin>(beauty.skins[0]);
|
|||
|
if (skin != null)
|
|||
|
IconProxy.Instance.SetSpriteAsync(_imgPicture, skin.picture);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void OnConfirmBtnClick()
|
|||
|
{
|
|||
|
CloseWindow(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|