PGRData/Script/matrix/xui/xuidlchunt/chip/XUiDlcHuntChipGridAttr.lua

24 lines
643 B
Lua
Raw Normal View History

2024-09-01 22:49:41 +02:00
---@class XUiDlcHuntChipGridAttr
local XUiDlcHuntChipGridAttr = XClass(nil, "XUiDlcHuntChipGridAttr")
function XUiDlcHuntChipGridAttr:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui.transform
XTool.InitUiObject(self)
end
function XUiDlcHuntChipGridAttr:Update(data)
self.TxtName1.text = data.Name
self.TxtAttr1.text = data.Value
if self.ImgDown then
self.ImgDown.gameObject:SetActiveEx(data.IsRed)
end
if self.ImgUp then
self.ImgUp.gameObject:SetActiveEx(data.IsGreen)
end
if self.Text2 then
self.Text2.text = data.NameEn
end
end
return XUiDlcHuntChipGridAttr