2025-06-04 05:02:57 +08:00

20 lines
495 B
Plaintext

local BaseCell = autoImport("BaseCell")
ActionCell = class("ActionCell", BaseCell)
function ActionCell:Init()
self.sprite = self:FindComponent("Symbol", UISprite);
-- self.label = self:FindGO("Label"):GetComponent(UILabel);
self:AddCellClickEvent();
end
function ActionCell:SetData(data)
self.data = data;
if(data and self.sprite)then
if(IconManager:SetActionIcon(data.Name, self.sprite))then
self.sprite:MakePixelPerfect();
end
-- self.label.text = "/"..data.Action;
end
end