update UIElements
This commit is contained in:
@@ -14,22 +14,17 @@ namespace YooAsset.Editor
|
||||
/// <summary>
|
||||
/// 单元列宽度
|
||||
/// </summary>
|
||||
public Length Width = 100f;
|
||||
public Length Width;
|
||||
|
||||
/// <summary>
|
||||
/// 单元列最小宽度
|
||||
/// </summary>
|
||||
public Length MinWidth = 30f;
|
||||
public Length MinWidth;
|
||||
|
||||
/// <summary>
|
||||
/// 单元列最大宽度
|
||||
/// </summary>
|
||||
public Length MaxWidth = MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// 文本的锚点类型
|
||||
/// </summary>
|
||||
public TextAnchor TxtAnchor = TextAnchor.MiddleLeft;
|
||||
public Length MaxWidth;
|
||||
|
||||
/// <summary>
|
||||
/// 可伸缩
|
||||
@@ -45,6 +40,25 @@ namespace YooAsset.Editor
|
||||
/// 可排序
|
||||
/// </summary>
|
||||
public bool Sortable = false;
|
||||
|
||||
public ColumnStyle(Length width)
|
||||
{
|
||||
if (width.value > MaxValue)
|
||||
width = MaxValue;
|
||||
|
||||
Width = width;
|
||||
MinWidth = width;
|
||||
MaxWidth = width;
|
||||
}
|
||||
public ColumnStyle(Length width, Length minWidth, Length maxWidth)
|
||||
{
|
||||
if (maxWidth.value > MaxValue)
|
||||
maxWidth = MaxValue;
|
||||
|
||||
Width = width;
|
||||
MinWidth = minWidth;
|
||||
MaxWidth = maxWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user