Vixen
02b45cc4
csharp
public abstract class PropertyDrawer<TValue, TEditor> where TEditor : UiElement

A drawer for one value type, with the cast done once.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Convenience, not a different contract: it exists so that a custom drawer is three short methods rather than three short methods plus two casts and a null check each.

Methods (3)

  • public virtual bool CanDraw(InspectorMember member)

    Whether this drawer can edit a member.

  • protected abstract TEditor Build(InspectorField field, UiElement parent)

    Makes the controls, once.

  • protected abstract void Show(InspectorField field, TEditor editor, TValue? value, bool isMixed)

    Puts the current value into the controls.

Used by (6)

  • BooleanDrawerVixen.Editor.Inspector
  • Color3DrawerVixen.Editor.Inspector
  • ColorDrawerVixen.Editor.Inspector
  • CurveDrawerVixen.Editor.Inspector
  • MultilineDrawerVixen.Editor.Inspector
  • StringDrawerVixen.Editor.Inspector