UICorner
UI modifier which applies deformation to corners of its parent GuiObject.
Memory category | Instances |
---|
Member index 1
Description
UICorner
is a modifier which applies deformation to corners of its parent
GuiObject. Input, but not descendants, will be clipped to the round
corner area. See here for
examples.
In order to keep the circular shape of round corners with the CornerRadius value (UDim), the radius is internally calculated as follows:
- The radius of the X axis is always the same as the radius of Y axis.
- Scale rounding will always apply to the minimum width or height.
- Rounded rectangles will always be in a "pill" shape if CornerRadius is set to a value that leads to a calculated result greater than half of the rectangle's minimum width or height.
Alternatively, rounded corners can be accomplished using slices which are suitable for decorative borders that are not simply rounded. See 9‑Slice Design for details.
Note that UICorner
can not be applied to a ScrollingFrame.
History 5
- 553 Change Default of CornerRadius from to UDim(0, 8)
- 486 Change ThreadSafety of CornerRadius from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CornerRadius from to ReadOnly
- 435 Add CornerRadius
- 435 Add UICorner
Members 1
CornerRadius
Type | Default | |
---|---|---|
UDim | 0, 8 |
A UDim property that determines the radius of the UICorner
component, internally calculated as follows:
- The radius of the X axis is always the same as the radius of Y axis.
- Scale rounding will always apply to the minimum width or height.
- Rounded rectangles will always be in a "pill" shape if
CornerRadius
is set to a value that leads to a calculated result greater than half of the rectangle's minimum width or height.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 4
- 553 Change Default of CornerRadius from to UDim(0, 8)
- 486 Change ThreadSafety of CornerRadius from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CornerRadius from to ReadOnly
- 435 Add CornerRadius