/// <summary> /// Activates the attributes of a Serializable class or struct and draws lines around the field. /// </summary> /// <param name="linePosition">The position options of the decoration.</param> /// <param name="nestOptionsCallback">Callback for the options of the Serializable class or struct. /// The callback type should be NestOption.</param> public LineNestAttribute(ArrayDecoratorPosition linePosition, string nestOptionsCallback = null) { PositionCallback = linePosition.ToString(); OptionsCallback = nestOptionsCallback; }
/// <summary> /// Activates the attributes of a Serializable class or struct and draws lines around the field. /// </summary> /// <param name="linePosition">The position options of the decoration.</param> /// <param name="options">Some drawing options for the field.</param> public LineNestAttribute(ArrayDecoratorPosition linePosition, NestOption options) { PositionCallback = linePosition.ToString(); OptionsCallback = options.ToString(); }
protected BaseArrayDecoratorAttribute(ArrayDecoratorPosition position) => Position = position;
/// <summary> /// Add some space horizontally or vertically, according to the layout you’re currently in. /// </summary> /// <param name="size">The size of space (default: 8).</param> /// <param name="position">The position options of the decoration (default: Before).</param> public LayoutSpaceAttribute(float size = 8, ArrayDecoratorPosition position = ArrayDecoratorPosition.Before) : base(position) => Size = size;
/// <summary> /// Draws a preview of the asset associated with the field. /// The field needs to be of type UnityEngine.Object (or be an array of this type), and it needs to have a preview texture. /// </summary> /// <param name="size">The size of the preview. It will be clamped by the maximum size of the preview texture.</param> /// <param name="align">The horizontal alignment of the preview.</param> /// <param name="position">The position options of the decoration.</param> public ShowAssetPreviewAttribute(int size, Align align, ArrayDecoratorPosition position) : base(position) { Size = size; Align = align; }
/// <summary> /// Draws a preview of the asset associated with the field. /// The field needs to be of type UnityEngine.Object (or be an array of this type), and it needs to have a preview texture. /// </summary> /// <param name="position">The position options of the decoration (default: After).</param> public AssetPreviewAttribute(ArrayDecoratorPosition position = ArrayDecoratorPosition.After) : base(position) { }
/// <summary> /// Draws a preview of the asset associated with the field. /// The field needs to be of type UnityEngine.Object (or be an array of this type), and it needs to have a preview texture. /// </summary> /// <param name="size">The size of the preview. It will be clamped by the maximum size of the preview texture.</param> /// <param name="align">The horizontal alignment of the preview.</param> /// <param name="position">The position options of the decoration.</param> public AssetPreviewAttribute(int size, Align align, ArrayDecoratorPosition position) : base(size, align, position) { }
/// <summary> /// Draws a preview of the asset associated with the field. /// The field needs to be of type UnityEngine.Object (or be an array of this type), and it needs to have a preview texture. /// </summary> /// <param name="position">The position options of the decoration (default: After).</param> public ShowAssetPreviewAttribute(ArrayDecoratorPosition position = ArrayDecoratorPosition.After) : this(96, Align.Right, position) { }
public static bool Contains(this ArrayDecoratorPosition position, ArrayDecoratorPosition flag) => (position & flag) != 0;
public static bool ContainsExact(this ArrayDecoratorPosition position, ArrayDecoratorPosition flag) => (position & flag) == flag;
/// <summary> /// Activates the attributes of a Serializable class or struct, draws lines around the field and wraps the field inside a dark area. /// </summary> /// <param name="linePosition">The position options of the decoration.</param> /// <param name="options">Some drawing options for the field.</param> public DarkNestAttribute(ArrayDecoratorPosition linePosition, NestOption options) : base(linePosition, options) { }
/// <summary> /// Activates the attributes of a Serializable class or struct, draws lines around the field and wraps the field inside a dark area. /// </summary> /// <param name="linePosition">The position options of the decoration.</param> /// <param name="nestOptionsCallback">Callback for the options of the Serializable class or struct. /// The callback type should be NestOption.</param> public DarkNestAttribute(ArrayDecoratorPosition linePosition, string nestOptionsCallback = null) : base(linePosition, nestOptionsCallback) { }
/// <summary> /// Add a flexible space if there’s any available. /// </summary> /// <param name="position">The position options of the decoration (default: Before).</param> public FlexibleSpaceAttribute(ArrayDecoratorPosition position = ArrayDecoratorPosition.Before) : base(position) { }
/// <summary> /// Draws a horizontal line around the member. /// </summary> /// <param name="color">The color of the line. /// See the doc fore more info on color values.</param> /// <param name="position">The position options of the decoration (default: Before).</param> public LineAttribute(ColorValue color, ArrayDecoratorPosition position = ArrayDecoratorPosition.Before) : base(position) =>
/// <summary> /// Draws a horizontal line around the member. /// </summary> /// <param name="position">The position options of the decoration (default: Before).</param> public LineAttribute(ArrayDecoratorPosition position = ArrayDecoratorPosition.Before) : base(position) { }