Table of Contents

Class GridTypeFieldAttribute

Namespace
Gamelogic.Fx.Dithering
Assembly
Gamelogic.Fx.Dithering.dll

Applied to a FundamentalRegion or FundamentalRegionRGB field to enable grid-type-aware editor UI: row indentation (half-cell stagger per row) and Z± shift buttons when the active grid type is Hex.

[AttributeUsage(AttributeTargets.Field)]
public sealed class GridTypeFieldAttribute : PropertyAttribute
Inheritance
GridTypeFieldAttribute
Inherited Members

Remarks

When used with no arguments the field is always drawn in hex mode. When ConditionalFieldName is supplied the drawer looks up that sibling field on the parent serialized object and enables hex UI only when its integer (enum) value equals HexEnumValue (default 0, i.e. Hex).

Constructors

GridTypeFieldAttribute()

Always draws in hex mode.

public GridTypeFieldAttribute()

GridTypeFieldAttribute(string, int)

Draws in hex mode only when the named sibling field has the given integer/enum value.

public GridTypeFieldAttribute(string conditionalFieldName, int hexEnumValue = 1)

Parameters

conditionalFieldName string

Serialized field name of the GridType sibling on the parent object.

hexEnumValue int

Value that means hex; defaults to 1 (Hex).

Properties

ConditionalFieldName

Name of a sibling serialized field on the parent object whose value determines the active grid type. When null the field is always drawn in hex mode.

public string ConditionalFieldName { get; }

Property Value

string

HexEnumValue

The integer (enum) value of ConditionalFieldName that means hex. Ignored when ConditionalFieldName is null. Defaults to 1 (Hex).

public int HexEnumValue { get; }

Property Value

int