PGRData/Script/matrix/xui/xuidoomsday/XUiGridDoomsdayInhabitantAttr.lua

19 lines
655 B
Lua

local XUiGridDoomsdayInhabitantAttr = XClass(nil, "XUiGridDoomsdayInhabitantAttr")
function XUiGridDoomsdayInhabitantAttr:Ctor(showFullName)
self.ShowFullName = showFullName
end
function XUiGridDoomsdayInhabitantAttr:Refresh(info)
self.RImgAttr:SetRawImage(XDoomsdayConfigs.AttributeTypeConfig:GetProperty(info.AttrType, "BadIcon"))
self.TxtTool1.text =
self.ShowFullName and
CsXTextManagerGetText(
"DoomsdayInhabitantAttrBad",
XDoomsdayConfigs.AttributeTypeConfig:GetProperty(info.AttrType, "BadName"),
info.Count
) or
info.Count
end
return XUiGridDoomsdayInhabitantAttr