public FixedGroupLengthConstraint( IFixedRectConstraintValueData valueData ) : base( valueData ) { }
public FixedElementLengthConstraint( IFixedRectConstraintValueData valueData ) : base( valueData ) { }
public FixedPaddingConstraint( IFixedRectConstraintValueData valueData ) : base( valueData ) { }
IRectConstraint CreateRectConstraint( RectConstraintType constraintType, FixedRectValueType fixedValueType, RectTransform referenceRect, Vector2 constraintValue ) { IRectConstraint rectConstraint; if (ConstraintIsFixedType(constraintType)) { IFixedRectConstraintValueData fixedConstraintValueData = CreateFixedConstraintValueData( fixedValueType, referenceRect, constraintValue ); switch (constraintType) { case RectConstraintType.FixedGroupLength: rectConstraint = new FixedGroupLengthConstraint( fixedConstraintValueData ); break; case RectConstraintType.FixedElementLength: rectConstraint = new FixedElementLengthConstraint( fixedConstraintValueData ); break; case RectConstraintType.FixedPadding: rectConstraint = new FixedPaddingConstraint( fixedConstraintValueData ); break; default: throw new System.InvalidOperationException( "fixed constraint must be one of the three" ); } } else // first constraint is ratio { switch (constraintType) { case RectConstraintType.GroupToElementRatio: rectConstraint = new GroupToElementRatioRectConstraint( constraintValue ); break; case RectConstraintType.ElementToPaddingRatio: rectConstraint = new ElementToPaddingRatioRectConstraint( constraintValue ); break; case RectConstraintType.GroupToPaddingRatio: rectConstraint = new GroupToPaddingRatioRectConstraint( constraintValue ); break; default: throw new System.InvalidOperationException( "ratio constraint must be one of three" ); } } return(rectConstraint); }
public AbsFixedRectConstraint( IFixedRectConstraintValueData valueData ) { thisValueData = valueData; }