Table of Contents

Class FlexalonCardLayout

Namespace
Flexalon
Assembly
Flexalon.dll

Use a card layout to fan out a hand of cards, or to spread overlapping cards across a table.

[AddComponentMenu("Flexalon/Flexalon Card Layout")]
[HelpURL("https://www.flexalon.com/docs/cardLayout")]
public class FlexalonCardLayout : FlexalonLayoutBase, IFlexalonLayout
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
FlexalonCardLayout
Implements
Inherited Members

Properties

CardDepth

The fixed card depth. Setting this selects Fixed depth. Negative values reverse hand stacking; tables use the magnitude.

public float CardDepth { get; set; }

Property Value

float

CardDepthType

How to determine card depth for overlap separation.

public FlexalonCardLayout.CardSizeTypes CardDepthType { get; set; }

Property Value

FlexalonCardLayout.CardSizeTypes

CardWidth

The fixed card width. Setting this selects Fixed width.

public float CardWidth { get; set; }

Property Value

float

CardWidthType

How to determine card width for overlap, rotation, and horizontal grip.

public FlexalonCardLayout.CardSizeTypes CardWidthType { get; set; }

Property Value

FlexalonCardLayout.CardSizeTypes

Curve

How far the middle of the cards bows away from a straight line. Zero is straight; negative values bend the other way.

public float Curve { get; set; }

Property Value

float

DepthCurve

How far the middle of the cards bows out of the plane they are spread in. Zero is flat; negative values bend the other way.

public float DepthCurve { get; set; }

Property Value

float

Direction

The direction along which card centers are spread. X is local right; Y is local up in Hand mode and local forward in Table mode. Magnitude is ignored; zero defaults to right.

public Vector2 Direction { get; set; }

Property Value

Vector2

Facing

The visible side of the cards. Does not change positions or stacking order.

public FlexalonCardLayout.Facings Facing { get; set; }

Property Value

FlexalonCardLayout.Facings

HorizontalGrip

Where each card is held in Hand mode: -1 is the left edge, 0 is the center, and 1 is the right edge. Cards fan around this point. Table mode ignores this value.

public float HorizontalGrip { get; set; }

Property Value

float

LayoutMode

Whether to arrange a hand or cards supported by a table.

public FlexalonCardLayout.LayoutModes LayoutMode { get; set; }

Property Value

FlexalonCardLayout.LayoutModes

OverlapDepth

Legacy alias for CardDepth. Setting this selects Fixed depth.

public float OverlapDepth { get; set; }

Property Value

float

Spread

The total distance from the first card center to the last card center.

public float Spread { get; set; }

Property Value

float

Methods

Arrange(IFlexalonNode, Vector3)

Position the children of node within the available bounds.

public override void Arrange(IFlexalonNode node, Vector3 layoutSize)

Parameters

node IFlexalonNode
layoutSize Vector3

Initialize()

Called when the component is first created.

protected override void Initialize()

Measure(IFlexalonNode, Vector3, Vector3, Vector3)

Perform minimal work to determine what the size of node and available size for node's children.

public override Bounds Measure(IFlexalonNode node, Vector3 size, Vector3 min, Vector3 max)

Parameters

node IFlexalonNode
size Vector3
min Vector3
max Vector3

Returns

Bounds