From f049177e20a276049c61edbad631c1b2bbdd5706 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Oct 2020 19:05:22 +0800 Subject: -advanced inspector +odin --- .../Plugins/AdvancedInspector/Attributes/Enum.cs | 68 ---------------------- 1 file changed, 68 deletions(-) delete mode 100644 Assets/Plugins/AdvancedInspector/Attributes/Enum.cs (limited to 'Assets/Plugins/AdvancedInspector/Attributes/Enum.cs') 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 -{ - /// - /// Controls how an enum is handled and displayed. - /// - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public class EnumAttribute : Attribute, IListAttribute - { - private bool masked = false; - - /// - /// Turns a normal enum into a bitfield. - /// Careful, your enum should be properly setup to accepted bitfield input. - /// - public bool Masked - { - get { return masked; } - set { masked = value; } - } - - private EnumDisplay display = EnumDisplay.DropDown; - - /// - /// Forces an enum to be displayed differently. - /// - public EnumDisplay Display - { - get { return display; } - set { display = value; } - } - - private int maxItemsPerRow = 6; - - /// - /// When display is using Button or Checkbox, this is the maximum number of button displayed per rows before creating a new one. - /// - 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 -- cgit v1.1-26-g67d0