public sealed class NumberDrawerA number, as a slider when it has bounds and a spin field when it does not.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ The type decides, and the range refines. A bounded number is a different thing to edit from an unbounded one — the bounds are the affordance, not a validation rule — which is why [Range] changes the control rather than adding a clamp to it.
⚠ Every editor works in double, and the member may be an int. The conversion back is here rather than in the control, because the control does not know what it is editing and a generated setter handed a double for an int field throws inside the cast.
Fields and properties (1)
public static IReadOnlyList<Type> SupportedTypesThe member types this draws.
Methods (3)
public bool CanDraw(InspectorMember member)Whether this drawer can edit a member.
public UiElement Build(InspectorField field, UiElement parent)Makes the controls, once.
public void Show(InspectorField field, UiElement editor)Puts the current value into controls that already exist.
Used by (2)
- DrawerRegistryVixen.Editor.Inspector
- DrawerTestsVixen.Editor.Inspector.Tests