zetake Posted August 10, 2019 Share Posted August 10, 2019 (edited) 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... Edited August 11, 2019 by zetake Link to comment https://forums.kleientertainment.com/forums/topic/110300-solved-item-tile/ Share on other sites More sharing options...
zetake Posted August 11, 2019 Author Share Posted August 11, 2019 (edited) 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) Edited August 11, 2019 by zetake Link to comment https://forums.kleientertainment.com/forums/topic/110300-solved-item-tile/#findComment-1242913 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now