forked from endernon/PGRData
21 lines
No EOL
683 B
Lua
21 lines
No EOL
683 B
Lua
local XUiGridDetailDormCharacter = XClass(nil, "XUiGridDetailDormCharacter")
|
|
|
|
function XUiGridDetailDormCharacter:Ctor(ui)
|
|
self.GameObject = ui.gameObject
|
|
self.Transform = ui.transform
|
|
XTool.InitUiObject(self)
|
|
end
|
|
|
|
function XUiGridDetailDormCharacter:Refresh(characterId, isLike)
|
|
self.CharacterId = characterId
|
|
|
|
local charStyleConfig = XDormConfig.GetCharacterStyleConfigById(characterId)
|
|
self.RImgHead:SetRawImage(charStyleConfig.HeadRoundIcon, nil, true)
|
|
|
|
self.PanelLikeIcon.gameObject:SetActive(isLike)
|
|
self.PanelHateIcon.gameObject:SetActive(not isLike)
|
|
|
|
self.TxtCharacterName.text = charStyleConfig.Name
|
|
end
|
|
|
|
return XUiGridDetailDormCharacter |