zetake Posted August 10, 2019 Share Posted August 10, 2019 Hi, I have made new item tile, but I can't make it to update itself if some item enters/leaves inventory... Function Inventory:SetOverflow(over), is updating it, but I can't use it... because it have important use... Alternatively I can use it with changing overflow to same overflow... Link to comment Share on other sites More sharing options...
zetake Posted August 11, 2019 Author Share Posted August 11, 2019 I don't know how I missed it, but updating is doing listener setoverflow. widgets/inventorybar: self.inst:ListenForEvent("setoverflow", function(inst, data) self:Rebuild() end, self.owner) self:Rebuild() Ok Solved. Spoiler AddClassPostConstruct("widgets/inventorybar", function(self, inst) self.inst:ListenForEvent("my_event", function(inst, data) self:Rebuild() end, self.owner) end) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.