PGRData/Script/matrix/xui/xuicharacter/XUiGridCharacterCareer.lua

20 lines
583 B
Lua
Raw Permalink Normal View History

local XUiGridCharacterCareer = XClass(nil, "XUiGridCharacterCareer")
function XUiGridCharacterCareer:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui.transform
XTool.InitUiObject(self)
end
function XUiGridCharacterCareer:Refresh(careerId)
local name = XCharacterConfigs.GetCareerName(careerId)
self.TxtTypeName.text = name
local des = XCharacterConfigs.GetCareerDes(careerId)
self.TxtTypeDes.text = des
local icon = XCharacterConfigs.GetNpcTypeIcon(careerId)
self.RImgCareerType:SetRawImage(icon)
end
return XUiGridCharacterCareer