using System;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
|
public class GuildApplyListCell : MonoBehaviour
|
{
|
[SerializeField] AvatarCell avatarCell;
|
[SerializeField] OfficialTitleCell officialTitleCell;
|
[SerializeField] TextEx nameText;
|
[SerializeField] TextEx lvText;
|
[SerializeField] TextEx fightPointText;
|
[SerializeField] ButtonEx yesButton;
|
[SerializeField] ButtonEx noButton;
|
GuildManager manager { get { return GuildManager.Instance; } }
|
public void Display(int index, List<FairyApply> list)
|
{
|
if (list.IsNullOrEmpty() || index >= list.Count || index < 0)
|
return;
|
FairyApply data = list[index];
|
nameText.text = data.Name;
|
lvText.text = data.LV.ToString();
|
fightPointText.text = UIHelper.ReplaceLargeArtNum(data.FightPower);
|
avatarCell.InitUI(AvatarHelper.GetAvatarModel(data.PlayerID, data.Face, data.FacePic));
|
officialTitleCell.InitUI(data.RealmLV, data.TitleID);
|
|
yesButton.SetListener(() =>
|
{
|
manager.SendJoinFamilyReply(data.PlayerID, true);
|
});
|
noButton.SetListener(() =>
|
{
|
manager.SendJoinFamilyReply(data.PlayerID, false);
|
});
|
}
|
|
}
|