public sealed class StateMapViewThe states of one layer, drawn as boxes with arrows between them.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ Drawn rather than built out of elements, for NodeMinimap's reason. A state is a rounded box with a label and an arrow is a line with a head; as elements they would be a style node, a layout box and a rebind each, for a picture whose only interactions are click and drag. Hit-testing two dozen rectangles is cheaper than laying out two dozen elements, and it is the whole of what this control needs.
⚠ The drag commits once, on release. Moving a state writes its position into the document, and a command per pointer-move would be forty undo entries for one drag — so the box follows the pointer in this control's own field and the document is told when the button comes up. That is the same bargain Timeline makes with its keys.
Fields and properties (7)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
public AnimationGraphDocument? GraphThe document it draws.
public int LayerIndexWhich layer, by index.
public AnimationStateData? SelectedWhich state is selected, or .
public bool ConnectingWhether a click adds a transition from the selection instead of selecting.
public const float BoxWidthHow wide a state's box is.
public const float BoxHeightAnd how tall.
Events (1)
public Action<StateMapView>? SelectionChangedRaised after the selection changes.
Methods (4)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public static AnimationStateData? At(AnimationLayerData layer, Vector2 point)The state whose box contains a point, or .
public void Refresh()Puts an element over each state's box, so the names can be read.
protected override void OnDraw(DrawContext context)Draws whatever this element is, beyond what a stylesheet can describe.
Used by (1)
- AnimationGraphViewVixen.Editor.AssetEditors