1.10.0: Added FieldLabelFromEnum for elements in an array

This commit is contained in:
Anders Ejlersen 2024-11-21 19:30:29 +01:00
parent ea527c9b33
commit a804633a14
6 changed files with 74 additions and 1 deletions

View file

@ -0,0 +1,23 @@
using System;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class FieldLabelFromEnumAttribute : PredrawerModifierPropertyAttribute
{
public readonly Type type;
public readonly bool nicify;
public FieldLabelFromEnumAttribute(Type type)
{
this.type = type;
nicify = true;
}
public FieldLabelFromEnumAttribute(Type type, bool nicify)
{
this.type = type;
this.nicify = nicify;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: be6a15d8da91402c9a038f8a08fc4772
timeCreated: 1732212352