mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-26 10:40:14 +00:00
update asset art reporter
This commit is contained in:
@@ -25,7 +25,12 @@ namespace YooAsset.Editor
|
||||
/// 单元列最大宽度
|
||||
/// </summary>
|
||||
public Length MaxWidth = MaxValue;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文本的锚点类型
|
||||
/// </summary>
|
||||
public TextAnchor TxtAnchor = TextAnchor.MiddleLeft;
|
||||
|
||||
/// <summary>
|
||||
/// 可伸缩
|
||||
/// </summary>
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace YooAsset.Editor
|
||||
toolbarBtn.userData = column;
|
||||
toolbarBtn.name = column.ElementName;
|
||||
toolbarBtn.text = column.HeaderTitle;
|
||||
toolbarBtn.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||
toolbarBtn.style.unityTextAlign = column.ColumnStyle.TxtAnchor;
|
||||
toolbarBtn.style.flexGrow = column.ColumnStyle.Stretchable ? 1f : 0f;
|
||||
toolbarBtn.style.width = column.ColumnStyle.Width;
|
||||
toolbarBtn.style.minWidth = column.ColumnStyle.MinWidth;
|
||||
|
||||
@@ -41,5 +41,36 @@ namespace YooAsset.Editor
|
||||
root.Add(spliteView);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示开关(眼睛图标)
|
||||
/// </summary>
|
||||
public class DisplayToggle : Toggle
|
||||
{
|
||||
private readonly VisualElement _checkbox;
|
||||
|
||||
public DisplayToggle()
|
||||
{
|
||||
_checkbox = this.Q<VisualElement>("unity-checkmark");
|
||||
RefreshIcon();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新图标
|
||||
/// </summary>
|
||||
public void RefreshIcon()
|
||||
{
|
||||
if (this.value)
|
||||
{
|
||||
var icon = EditorGUIUtility.IconContent("animationvisibilitytoggleoff@2x").image as Texture2D;
|
||||
_checkbox.style.backgroundImage = icon;
|
||||
}
|
||||
else
|
||||
{
|
||||
var icon = EditorGUIUtility.IconContent("animationvisibilitytoggleon@2x").image as Texture2D;
|
||||
_checkbox.style.backgroundImage = icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
|
||||
#if UNITY_2019
|
||||
public static partial class UnityEngine_UIElements_ListView_Extension
|
||||
{
|
||||
@@ -21,5 +20,4 @@ namespace YooAsset.Editor
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user