protected SelectionContext(Feature feature, OrderedProperty orderedProperty, float parentX, float parentY, Func <T, Picker <T> > builder) { Feature = feature; OrderedProperty = orderedProperty; Picker = builder((T)orderedProperty.Property.GetValue(feature)); var position = Event.current.mousePosition; Picker.SetWindowPosition(parentX + LabelStyle.fixedWidth * 3 + LabelStyle.margin.left * 6, position.y + parentY - 32f); }
public KeyCodeSelectionContext(Feature feature, OrderedProperty orderedProperty, float parentX, float parentY) : base(feature, orderedProperty, parentX, parentY, color => new EnumPicker <KeyCode>(color)) { }
public ColorSelectionContext(Feature feature, OrderedProperty orderedProperty, float parentX, float parentY) : base(feature, orderedProperty, parentX, parentY, color => new ColorPicker(color)) { }