PGRData/Resources/Scripts/XUi/XUiDormSecond/XUiGridLikeInfo.lua
2022-12-26 14:06:01 +05:30

17 lines
No EOL
572 B
Lua

local XUiGridLikeInfo = XClass(nil, "XUiGridLikeInfo")
function XUiGridLikeInfo:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui.transform
XTool.InitUiObject(self)
end
function XUiGridLikeInfo:Refresh(config)
local charLevelConfig = XDataCenter.DormManager.GetCharRecoveryCurLevel(config.CharacterId)
local isCur = charLevelConfig and charLevelConfig.Pre == config.Pre
self.ImgNormal.gameObject:SetActive(not isCur)
self.ImgCurrent.gameObject:SetActive(isCur)
self.TxtDesc.text = config.Description
end
return XUiGridLikeInfo