/// <summary> /// Draws the read-only field that links to the script anywhere in the inspector. /// </summary> /// <param name="position">The position options of the decoration.</param> public ScriptFieldAttribute(DecoratorPosition position = DecoratorPosition.Before) : base(position) { }
/// <summary> /// Draws a label with a prefix around the member. /// </summary> /// <param name="prefix"> The text of the prefix.</param> /// <param name="label">The text of the label.</param> /// <param name="position">The position options of the decoration.</param> public LabelAttribute(string prefix, string label, DecoratorPosition position) : base(prefix, label, false, false, position) { }
/// <summary> /// Draws a label around the member. /// </summary> /// <param name="label">The text of the label.</param> /// <param name="labelAsCallback">Choose whether or not the label should be considered as a callback of type string.</param> /// <param name="styleName">The style name for the GUIStyle of the label (it won't affect the prefix). /// See the doc for more info on style names.</param> /// <param name="position">The position options of the decoration.</param> public LabelAttribute(string label, bool labelAsCallback, string styleName, DecoratorPosition position) : base(label, labelAsCallback, position) => StyleName = styleName;
public static bool Contains(this DecoratorPosition position, DecoratorPosition flag) => (position & flag) != 0;
public static bool ContainsExact(this DecoratorPosition position, DecoratorPosition flag) => (position & flag) == flag;
/// <summary> /// Draws a help box around the member. /// </summary> /// <param name="message">The message of the box.</param> /// <param name="type">The type of the box. It can be Info, Warning or Error (default: Info).</param> /// <param name="position">The position options of the decoration (default: Before).</param> public HelpBoxAttribute(string message, HelpBoxType type, DecoratorPosition position) : this(message, type, null, position) { }
protected BasePositionDecoratorAttribute(DecoratorPosition position) => Position = position;
/// <summary> /// Draws a help box around the member. /// </summary> /// <param name="message">The message of the box.</param> /// <param name="visibleCallback">callback to define whether or not the box is visible. /// The callback type should be bool.</param> /// <param name="position">The position options of the decoration (default: Before).</param> public HelpBoxAttribute(string message, string visibleCallback, DecoratorPosition position = DecoratorPosition.Before) : this(message, HelpBoxType.Info, visibleCallback, position) { }
public FlexibleSpaceAttribute(DecoratorPosition position = DecoratorPosition.Before) => Position = position;
/// <summary> /// Draws a title around the member, just like Unity's [Header]. /// </summary> /// <param name="title">The text of the title.</param> /// <param name="position">The position options of the decoration (default: Before).</param> public TitleAttribute(string title, DecoratorPosition position = DecoratorPosition.Before) : base(position) => Title = title;
protected BaseLabelAttribute(string prefix, string label, bool prefixAsCallback, bool labelAsCallback, DecoratorPosition position) : base(position) { Prefix = prefix; Label = label; PrefixAsCallback = prefixAsCallback; LabelAsCallback = labelAsCallback; }
protected BaseLabelAttribute(string label, bool labelAsCallback, DecoratorPosition position) : base(position) { Label = label; LabelAsCallback = labelAsCallback; }