コード例 #1
0
ファイル: LineNestAttribute.cs プロジェクト: Nama3/madrace
 /// <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;
 }
コード例 #2
0
ファイル: LineNestAttribute.cs プロジェクト: Nama3/madrace
 /// <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();
 }
コード例 #3
0
 protected BaseArrayDecoratorAttribute(ArrayDecoratorPosition position) => Position = position;
コード例 #4
0
 /// <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;
コード例 #5
0
 /// <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;
 }
コード例 #6
0
 /// <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)
 {
 }
コード例 #7
0
 /// <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)
 {
 }
コード例 #8
0
 /// <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)
 {
 }
コード例 #9
0
ファイル: MightyEnums.cs プロジェクト: Nama3/madrace
 public static bool Contains(this ArrayDecoratorPosition position, ArrayDecoratorPosition flag) => (position & flag) != 0;
コード例 #10
0
ファイル: MightyEnums.cs プロジェクト: Nama3/madrace
 public static bool ContainsExact(this ArrayDecoratorPosition position, ArrayDecoratorPosition flag) => (position & flag) == flag;
コード例 #11
0
 /// <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)
 {
 }
コード例 #12
0
 /// <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)
 {
 }
コード例 #13
0
 /// <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)
 {
 }
コード例 #14
0
 /// <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) =>
コード例 #15
0
 /// <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)
 {
 }