diff options
author | chai <chaifix@163.com> | 2020-10-15 19:05:22 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-15 19:05:22 +0800 |
commit | f049177e20a276049c61edbad631c1b2bbdd5706 (patch) | |
tree | 7d1a1cd9b690a5d9a8b9a65554a191d6ec769601 /Assets/Plugins/AdvancedInspector/Attributes/Enum.cs | |
parent | 6990a0d1fbdcbbf404f40713363ac1a148c8840a (diff) |
-advanced inspector
+odin
Diffstat (limited to 'Assets/Plugins/AdvancedInspector/Attributes/Enum.cs')
-rw-r--r-- | Assets/Plugins/AdvancedInspector/Attributes/Enum.cs | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/Assets/Plugins/AdvancedInspector/Attributes/Enum.cs b/Assets/Plugins/AdvancedInspector/Attributes/Enum.cs deleted file mode 100644 index f9b88281..00000000 --- a/Assets/Plugins/AdvancedInspector/Attributes/Enum.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; - -namespace AdvancedInspector -{ - /// <summary> - /// Controls how an enum is handled and displayed. - /// </summary> - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public class EnumAttribute : Attribute, IListAttribute - { - private bool masked = false; - - /// <summary> - /// Turns a normal enum into a bitfield. - /// Careful, your enum should be properly setup to accepted bitfield input. - /// </summary> - public bool Masked - { - get { return masked; } - set { masked = value; } - } - - private EnumDisplay display = EnumDisplay.DropDown; - - /// <summary> - /// Forces an enum to be displayed differently. - /// </summary> - public EnumDisplay Display - { - get { return display; } - set { display = value; } - } - - private int maxItemsPerRow = 6; - - /// <summary> - /// When display is using Button or Checkbox, this is the maximum number of button displayed per rows before creating a new one. - /// </summary> - public int MaxItemsPerRow - { - get { return maxItemsPerRow; } - set { maxItemsPerRow = value; } - } - - public EnumAttribute(bool masked) - { - this.masked = masked; - } - - public EnumAttribute(EnumDisplay display) - { - this.display = display; - } - - public EnumAttribute(bool masked, EnumDisplay display) - { - this.masked = masked; - this.display = display; - } - } - - public enum EnumDisplay - { - DropDown, - Button, - Checkbox - } -}
\ No newline at end of file |