//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Wednesday, December 19, 2018
|
//--------------------------------------------------------
|
using EnhancedUI.EnhancedScroller;
|
using System.Collections;
|
using System.Collections.Generic;
|
using TableConfig;
|
using UnityEngine;
|
using UnityEngine.UI;
|
using System;
|
|
namespace Snxxz.UI {
|
|
public class RankCellCtrl : ScrollerUI
|
{
|
[SerializeField] Button m_RankButton;
|
[SerializeField] Text m_RankNum;
|
[SerializeField] Image m_RankNumBottom;
|
[SerializeField] Text m_NameTxt;
|
[SerializeField] Text m_JobTxt;
|
[SerializeField] Text m_RankWhatTxt;
|
[SerializeField] Text m_SegmentTxt;
|
[SerializeField] Text m_IntegralTxt;
|
CrossServerRewardModel m_CrossServerRewardModel;
|
CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
public override void Refresh(CellView cell)
|
{
|
int index = cell.index;
|
if (index < 3)
|
{
|
m_RankNumBottom.gameObject.SetActive(true);
|
if (index == 0)
|
{
|
m_RankNumBottom.SetSprite("Rank_First");
|
}
|
else if (index == 1)
|
{
|
m_RankNumBottom.SetSprite("Rank_Second");
|
}
|
else if (index == 2)
|
{
|
m_RankNumBottom.SetSprite("Rank_Third");
|
}
|
m_RankNum.gameObject.SetActive(false);
|
}
|
else
|
{
|
m_RankNumBottom.gameObject.SetActive(false);
|
m_RankNum.text = (index + 1).ToString();
|
m_RankNum.gameObject.SetActive(true);
|
}
|
RankingInformationClass data = null;
|
if (crossServerRewardModel.RankInformationDic != null && index < crossServerRewardModel.RankInformationDic.Count)
|
{
|
data = crossServerRewardModel.RankInformationDic[index];
|
}
|
if (data != null)
|
{
|
|
}
|
else
|
{
|
m_NameTxt.text = Language.Get("L1046");
|
m_JobTxt.text = "-";
|
m_RankWhatTxt.text = "-";
|
m_SegmentTxt.text= "-";
|
m_IntegralTxt.text= "-";
|
|
m_NameTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
m_JobTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
m_RankWhatTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
}
|
}
|
}
|
|
}
|