I had a need recently for something like the UIInlineLayout object which had been added to the engine around 2 years or so ago now but still hasn’t been released or even mentioned since then and due to a lack of it, I decided to make my own implementation of it in Lua which also has more functionality then it provides in the initial version of it I saw and decided to open source it.
Here is a link to the model:
https://roblox.com/library/6750421693/UI-Inline-Layout
Documentation
Constructors
UIInlineLayout.new(frame: GuiObject)
Creates a new UIInlineLayout object for this frame
UIInlineLayout
void UIInlineLayout:ApplyLayout()
Forcibly applies the layout to the frame
- Automatically gets called whenever it identifies a change to the layout or the contents of the frame
void UIInlineLayout:Destroy()
Destroys the layout and cleans up all of its signals
- Automatically gets called if it detects the frame has been destroyed (Parented to nil in this case)
string UIInlineLayout.StartCorner
A string representing the corner it will start from, valid inputs include:
- TopLeft
- TopRight
- BottomLeft
- BottomRight
UDim2 UIInlineLayout.Padding
The padding between rows and columns
FillDirection UIInlineLayout.FillDirection
The direction the layout should fill in
number UIInlineLayout.InlineAlignment
A 0-1 number representing the vertical (or horizontal, depending on your FillDirection) alignment of objects in each row
- This can also be influenced on a per-object basis via an identically named attribute being applied to the object