So I plan on having a scroll frame that inside has multiple buttons laid out using UIGrid layout or UIList layout, and every time you collect an item it adds to the inventory. But eventually the entire frame would be taking up but the scrollbar has met it's maximum scroll distance, how would players be able to reach to the bottom?
I have noticed that there is a property called CanvasSize, but how would I need to change the size of it so that any amount of items can be included inside, potentially a HUGE amount. What kind of fancy maths would I need to do?
Fairly easy, actually. A UIListLayout has an AbsoluteContentSize
that you can use for your canvas size. Consider the following:
UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() local size = UIListLayout.AbsoluteContentSize ScrollingFrame.CanvasSize = UDim2.new(0,size.X,0,size.Y) end)
This will update the CanvasSize every time the content changes.