架构大更
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
namespace SLSUtilities.General
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
||||
public class DictionaryTitleAttribute : Attribute
|
||||
{
|
||||
public string Title;
|
||||
|
||||
public DictionaryTitleAttribute(string title)
|
||||
{
|
||||
Title = title;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
|
||||
public class ToolbarButtonAttribute : Attribute
|
||||
{
|
||||
public string MethodName { get; private set; }
|
||||
public SdfIconType Icon { get; private set; }
|
||||
public string Tooltip { get; private set; }
|
||||
|
||||
public ToolbarButtonAttribute(string methodName, SdfIconType icon, string tooltip = "")
|
||||
{
|
||||
MethodName = methodName;
|
||||
Icon = icon;
|
||||
Tooltip = tooltip;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
||||
public class SerializedDictionarySettingsAttribute : Attribute
|
||||
{
|
||||
public string KeyLabel;
|
||||
public string ValueLabel;
|
||||
|
||||
public SerializedDictionarySettingsAttribute(string keyLabel, string valueLabel)
|
||||
{
|
||||
KeyLabel = keyLabel;
|
||||
ValueLabel = valueLabel;
|
||||
}
|
||||
|
||||
// 可选:你还可以加更多设置,比如每行的高度等
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user