public RandomEyesTargetUI( EyesModifierTargetUIContainer parent, EyesTargetContainer tc) : base(parent, tc) { target_ = tc.Target as RandomEyesTarget; var r = new FloatRange(0, 10); atom_ = new AtomList( "Relative atom", target_?.Atom?.uid, AtomChanged, null, Widget.Right); rel_ = new ForceReceiverList( "Relative receiver", target_?.RelativeTo?.name, ReceiverChanged, Widget.Right); distance_ = new FloatSlider( "Distance", target_.Distance, r, DistanceChanged, Widget.Right); centerX_ = new FloatSlider( "Offset X", target_.CenterX, r, CenterXChanged, Widget.Right); centerY_ = new FloatSlider( "Offset Y", target_.CenterY, r, CenterYChanged, Widget.Right); xRange_ = new FloatSlider( "Range X", target_.RangeX, r, RangeXChanged, Widget.Right); yRange_ = new FloatSlider( "Range Y", target_.RangeY, r, RangeYChanged, Widget.Right); avoidXRange_ = new FloatSlider( "Avoid range X", target_.AvoidRangeX, r, AvoidRangeXChanged, Widget.Right); avoidYRange_ = new FloatSlider( "Avoid range Y", target_.AvoidRangeY, r, AvoidRangeYChanged, Widget.Right); rel_.Atom = target_.Atom; }
public RigidbodyEyesTargetUI( EyesModifierTargetUIContainer parent, EyesTargetContainer tc) : base(parent, tc) { target_ = tc.Target as RigidbodyEyesTarget; atom_ = new AtomList( "Atom", target_?.Atom?.uid, AtomChanged, null, Widget.Right); receiver_ = new ForceReceiverList( "Receiver", target_?.Receiver?.name, ReceiverChanged, Widget.Right); offset_ = new Vector3UI( "Offset", Widget.Right, new FloatRange(-10, 10), OffsetChanged); offset_.Value = target_.Offset; receiver_.Atom = target_.Atom; }
public LinkModifierControllerUI( LinkModifier m, LinkModifierController mc) { modifier_ = m; mc_ = mc; collapsible_ = new Collapsible(mc_.Name, null, Widget.Right); delete_ = new ConfirmableButton("Delete", Delete, Widget.Right); controller_ = new FreeControllerList( "Controller", mc_.ControllerName, ControllerChanged, Widget.Right); atom_ = new AtomList( "Link to atom", mc_.AtomName, AtomChanged, null, Widget.Right | Widget.AllowNone); rb_ = new LinkTargetList( "Link to", mc_.RigidbodyName, RigidbodyChanged, Widget.Right | Widget.AllowNone); position_ = new PositionStateList( "Position", "", PositionChanged, Widget.Right | Widget.AllowNone); rotation_ = new RotationStateList( "Rotation", "", RotationChanged, Widget.Right | Widget.AllowNone); Update(); collapsible_.Add(delete_); collapsible_.Add(controller_); collapsible_.Add(atom_); collapsible_.Add(rb_); collapsible_.Add(position_); collapsible_.Add(rotation_); collapsible_.Add(new SmallSpacer(Widget.Right)); }
public AtomModifierUI(MainUI ui, AtomList.AtomPredicate pred = null) : base(ui) { atom_ = new AtomList("Atom", "", AtomChanged, pred, Widget.Right); }