调整属性分组和注释

This commit is contained in:
ww-rm
2025-03-26 19:52:29 +08:00
parent e6f533ea65
commit 693ce0e2e8

View File

@@ -185,11 +185,6 @@ namespace SpineViewer.Spine
return (Spine)Activator.CreateInstance(spineType, skelPath, atlasPath);
}
/// <summary>
/// 标识符
/// </summary>
public readonly string ID = Guid.NewGuid().ToString();
/// <summary>
/// 构造函数
/// </summary>
@@ -217,7 +212,7 @@ namespace SpineViewer.Spine
public void Dispose() { Dispose(true); GC.SuppressFinalize(this); }
protected virtual void Dispose(bool disposing) { preview?.Dispose(); }
#region |
#region | [0]
/// <summary>
/// 获取所属版本
@@ -258,52 +253,52 @@ namespace SpineViewer.Spine
#endregion
#region |
#region | [1]
/// <summary>
/// 是否被隐藏, 被隐藏的模型将仅仅在列表显示, 不参与其他行为
/// </summary>
[Category("[1] "), DisplayName("")]
public bool IsHidden { get; set; } = false;
/// <summary>
/// 是否使用预乘Alpha
/// </summary>
[Category("[1] "), DisplayName("Alpha通道")]
public bool UsePremultipliedAlpha { get; set; } = true;
#endregion
#region | [2]
/// <summary>
/// 缩放比例
/// </summary>
[Category("[1] "), DisplayName("")]
[Category("[2] "), DisplayName("")]
public abstract float Scale { get; set; }
/// <summary>
/// 位置
/// </summary>
[TypeConverter(typeof(PointFConverter))]
[Category("[1] "), DisplayName("")]
[Category("[2] "), DisplayName("")]
public abstract PointF Position { get; set; }
/// <summary>
/// 水平翻转
/// </summary>
[Category("[1] "), DisplayName("")]
[Category("[2] "), DisplayName("")]
public abstract bool FlipX { get; set; }
/// <summary>
/// 垂直翻转
/// </summary>
[Category("[1] "), DisplayName("")]
[Category("[2] "), DisplayName("")]
public abstract bool FlipY { get; set; }
#endregion
#region |
/// <summary>
/// 是否使用预乘Alpha
/// </summary>
[Category("[3] "), DisplayName("Alpha通道")]
public bool UsePremultipliedAlpha { get; set; } = true;
/// <summary>
/// 是否被隐藏, 被隐藏的模型将仅仅在列表显示, 不参与其他行为
/// </summary>
[Category("[3] "), DisplayName("")]
public bool IsHidden { get; set; } = false;
#endregion
#region |
#region | [3]
/// <summary>
/// 包含的所有动画名称
@@ -316,13 +311,13 @@ namespace SpineViewer.Spine
/// 当前动画名称, 如果设置的动画不存在则忽略
/// </summary>
[TypeConverter(typeof(AnimationConverter))]
[Category("[2] "), DisplayName("")]
[Category("[3] "), DisplayName("")]
public abstract string CurrentAnimation { get; set; }
/// <summary>
/// 当前动画时长
/// </summary>
[Category("[2] "), DisplayName("")]
[Category("[3] "), DisplayName("")]
public float CurrentAnimationDuration { get => GetAnimationDuration(CurrentAnimation); }
/// <summary>
@@ -336,11 +331,60 @@ namespace SpineViewer.Spine
/// 当前皮肤名称, 如果设置的皮肤不存在则忽略
/// </summary>
[TypeConverter(typeof(SkinConverter))]
[Category("[2] "), DisplayName("")]
[Category("[3] "), DisplayName("")]
public abstract string CurrentSkin { get; set; }
#endregion
#region | [4]
/// <summary>
/// 显示调试
/// </summary>
[Browsable(false)]
public bool IsDebug { get; set; } = false;
/// <summary>
/// 包围盒颜色
/// </summary>
protected static readonly SFML.Graphics.Color BoundsColor = new(120, 200, 0);
/// <summary>
/// 包围盒顶点数组
/// </summary>
protected readonly SFML.Graphics.VertexArray boundsVertices = new(SFML.Graphics.PrimitiveType.LineStrip, 5);
/// <summary>
/// 显示纹理
/// </summary>
[Category("[4] "), DisplayName("")]
public bool DebugTexture { get; set; } = true;
/// <summary>
/// 显示包围盒
/// </summary>
[Category("[4] "), DisplayName("")]
public bool DebugBounds { get; set; } = true;
/// <summary>
/// 显示骨骼
/// </summary>
[Category("[4] "), DisplayName("")]
public bool DebugBones { get; set; } = false;
#endregion
/// <summary>
/// 标识符
/// </summary>
public readonly string ID = Guid.NewGuid().ToString();
/// <summary>
/// 是否被选中
/// </summary>
[Browsable(false)]
public bool IsSelected { get; set; } = false;
/// <summary>
/// 骨骼包围盒
/// </summary>
@@ -409,43 +453,8 @@ namespace SpineViewer.Spine
/// <summary>
/// 更新内部状态
/// </summary>
/// <param name="delta">时间间隔</param>
public abstract void Update(float delta);
/// <summary>
/// 是否被选中
/// </summary>
[Browsable(false)]
public bool IsSelected { get; set; } = false;
/// <summary>
/// 显示调试
/// </summary>
[Browsable(false)]
public bool IsDebug { get; set; } = false;
/// <summary>
/// 包围盒颜色
/// </summary>
protected static readonly SFML.Graphics.Color BoundsColor = new(120, 200, 0);
/// <summary>
/// 包围盒顶点数组
/// </summary>
protected readonly SFML.Graphics.VertexArray boundsVertices = new(SFML.Graphics.PrimitiveType.LineStrip, 5);
/// <summary>
/// 显示包围盒
/// </summary>
[Category("[4] "), DisplayName("")]
public bool DebugBounds { get; set; } = true;
/// <summary>
/// 显示骨骼
/// </summary>
[Category("[4] "), DisplayName("(TODO)")]
public bool DebugBones { get; set; } = false;
#region SFML.Graphics.Drawable
/// <summary>