Tri-Inspector/Editor/Attributes.cs

65 lines
1.9 KiB
C#
Raw Normal View History

2021-12-07 10:20:36 -05:00
using System;
namespace TriInspector
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
2022-01-06 12:11:27 -05:00
public class RegisterTriValueDrawerAttribute : Attribute
2021-12-07 10:20:36 -05:00
{
2022-01-06 12:11:27 -05:00
public RegisterTriValueDrawerAttribute(Type drawerType, int order)
2021-12-07 10:20:36 -05:00
{
DrawerType = drawerType;
Order = order;
}
public Type DrawerType { get; }
public int Order { get; }
2022-01-06 12:11:27 -05:00
public TriTargetPropertyType Target { get; set; } = TriTargetPropertyType.SelfAndArrayElements;
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriAttributeDrawerAttribute : Attribute
{
public RegisterTriAttributeDrawerAttribute(Type drawerType, int order)
{
DrawerType = drawerType;
Order = order;
}
public Type DrawerType { get; }
public int Order { get; }
public TriTargetPropertyType Target { get; set; } = TriTargetPropertyType.Self;
2021-12-07 10:20:36 -05:00
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriGroupDrawerAttribute : Attribute
{
public RegisterTriGroupDrawerAttribute(Type drawerType)
{
DrawerType = drawerType;
}
public Type DrawerType { get; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriPropertyHideProcessor : Attribute
{
public RegisterTriPropertyHideProcessor(Type processorType)
{
ProcessorType = processorType;
}
public Type ProcessorType { get; }
}
2022-01-06 12:11:27 -05:00
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterTriPropertyDisableProcessor : Attribute
{
public RegisterTriPropertyDisableProcessor(Type processorType)
{
ProcessorType = processorType;
}
public Type ProcessorType { get; }
}
2021-12-07 10:20:36 -05:00
}