PGRData/Script/matrix/xui/xuiexpedition/mainpage/detailproxy/XUiExpeditionDetailHeadIcon.lua

24 lines
No EOL
992 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--虚像地平线关卡详细界面头像控件
local XUiExpeditionDetailHeadIcon = XClass(nil, "XUiExpeditionDetailHeadIcon")
function XUiExpeditionDetailHeadIcon:Ctor(ui)
XTool.InitUiObjectByUi(self, ui)
end
function XUiExpeditionDetailHeadIcon:RefreshData(teamData)
if not teamData then
self.GameObject:SetActiveEx(false)
return
end
self.GameObject:SetActiveEx(true)
--这里使用查表方式展示因为通关人员可能因为重置而导致eChara重置
local cfg = XExpeditionConfig.GetBaseCharacterCfgById(teamData.BaseId)
local fashionId = XCharacterConfigs.GetCharacterTemplate(cfg.CharacterId).DefaultNpcFashtionId
local head = XDataCenter.FashionManager.GetFashionBigHeadIcon(fashionId)
self.RImgIcon:SetRawImage(head)
self.TxtLevel.text = teamData.Rank
local tradeName = XCharacterConfigs.GetCharacterTradeName(cfg.CharacterId)
self.TxtName.text = tradeName or "UnNamed"
end
return XUiExpeditionDetailHeadIcon