Jump to content

[Solved] Item Tile


zetake

Recommended Posts

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

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

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.

×
×
  • Create New...