ro-table/Asstes/Resources/Script/FrameWork/GUI/cell/Bag/ItemFuncButtonCell.txt
2025-06-04 05:02:57 +08:00

19 lines
428 B
Plaintext

local BaseCell = autoImport("BaseCell")
ItemFuncButtonCell = class("ItemFuncButtonCell", BaseCell)
function ItemFuncButtonCell:Init()
self.bg = self:FindComponent("Background", UILabel);
self.label = self:FindComponent("Label", UILabel);
self:AddCellClickEvent();
end
function ItemFuncButtonCell:SetData(data)
if(data)then
self.data = data;
if(data.name)then
self.label.text = tostring(data.name)
end
end
end