下面的表格概述了所有可以样式化的类及其相关属性。随着时间的推移,可能会添加额外的支持,因此请将此页面添加书签以便参考。
用户界面对象
GuiObject
GuiObject 是一个抽象类,大多数UI类都继承自它,包括 frames、labels、buttons 等。
GuiButton
| 属性 | 类型 |
|---|---|
| GuiButton.AutoButtonColor | boolean |
TextLabel
TextButton
ImageLabel
ImageButton
TextBox
| 属性 | 类型 |
|---|---|
| TextBox.ClearTextOnFocus | boolean |
| TextBox.MultiLine | boolean |
| TextBox.PlaceholderColor3 | Color3 |
| TextBox.PlaceholderText | string |
| TextBox.ShowNativeInput | string |
| TextBox.TextEditable | boolean |
ScrollingFrame
ViewportFrame
| 属性 | 类型 |
|---|---|
| ViewportFrame.Ambient | Color3 |
| ViewportFrame.ImageColor3 | Color3 |
| ViewportFrame.ImageTransparency | float |
| ViewportFrame.LightColor | Color3 |
| ViewportFrame.LightDirection | Vector3 |
Path2D
| 属性 | 类型 |
|---|---|
| Path2D.Closed | boolean |
| Path2D.Color3 | Color3 |
| Path2D.Thickness | float |
| Path2D.Visible | boolean |
| Path2D.ZIndex | integer |
CanvasGroup
外观修饰符
UICorner
| 属性 | 类型 |
|---|---|
| UICorner.CornerRadius | UDim |
| UICorner.BottomLeftRadius | UDim |
| UICorner.BottomRightRadius | UDim |
| UICorner.TopLeftRadius | UDim |
| UICorner.TopRightRadius | UDim |
UIGradient
| 属性 | 类型 |
|---|---|
| UIGradient.Color | ColorSequence |
| UIGradient.Enabled | boolean |
| UIGradient.Offset | Vector2 |
| UIGradient.Rotation | float |
| UIGradient.Transparency | NumberSequence |
UIPadding
| 属性 | 类型 |
|---|---|
| UIPadding.PaddingBottom | UDim |
| UIPadding.PaddingLeft | UDim |
| UIPadding.PaddingRight | UDim |
| UIPadding.PaddingTop | UDim |
UIShadow
| 属性 | 类型 |
|---|---|
| UIShadow.BlurRadius | UDim |
| UIShadow.Color | Color3 |
| UIShadow.Offset | UDim2 |
| UIShadow.Spread | UDim2 |
| UIShadow.Transparency | float |
| UIShadow.ZIndex | integer |
UIStroke
| 属性 | 类型 |
|---|---|
| UIStroke.ApplyStrokeMode | Enum.ApplyStrokeMode |
| UIStroke.Color | Color3 |
| UIStroke.Enabled | boolean |
| UIStroke.LineJoinMode | Enum.LineJoinMode |
| UIStroke.Thickness | float |
| UIStroke.Transparency | float |
布局结构
UIListLayout
UIGridStyleLayout
UIGridLayout
| 属性 | 类型 |
|---|---|
| UIGridLayout.CellPadding | UDim2 |
| UIGridLayout.CellSize | UDim2 |
| UIGridLayout.FillDirectionMaxCells | integer |
| UIGridLayout.StartCorner | Enum.StartCorner |
UIPageLayout
尺寸修饰符和约束
UIAspectRatioConstraint
| 属性 | 类型 |
|---|---|
| UIAspectRatioConstraint.AspectRatio | float |
| UIAspectRatioConstraint.AspectType | Enum.AspectType |
| UIAspectRatioConstraint.DominantAxis | Enum.DominantAxis |
UISizeConstraint
UITextSizeConstraint
| 属性 | 类型 |
|---|---|
| UITextSizeConstraint.MaxTextSize | integer |
| UITextSizeConstraint.MinTextSize | integer |
UIScale
| 属性 | 类型 |
|---|---|
| UIScale.Scale | float |
UIFlexItem
| 属性 | 类型 |
|---|---|
| UIFlexItem.FlexMode | Enum.UIFlexMode |
| UIFlexItem.GrowRatio | float |
| UIFlexItem.ItemLineAlignment | Enum.ItemLineAlignment |
| UIFlexItem.ShrinkRatio | float |
StyleQuery
StyleQuery 让您定义条件断点(如容器/媒体查询),控制样式何时应用于查询的父实例。