public void SetOneSideRelation(Vector2 _customRatio) { useRelativeData = true; relativeTo = SizeRelation.OneSideOfScreen; customRatio = _customRatio; SetRelativeData(); }
public void SetBothSideRelation(TextAnchor _positionAnchor, AnchorBounds _anchorBounds, Vector2 _relativePosition, Vector2 _relativeSize) { useRelativeData = true; relativeTo = SizeRelation.BothSidesOfScreen; positionAnchor = _positionAnchor; anchorBounds = _anchorBounds; relativePosition = _relativePosition; relativeSize = _relativeSize; SetRelativeData(); }
public void SetOneSideRelation(TextAnchor _positionAnchor, AnchorBounds _anchorBounds, Vector2 _relativePosition, ScreenAxis _axis, float _relativeSize, Vector2 _customRatio) { useRelativeData = true; relativeTo = SizeRelation.OneSideOfScreen; positionAnchor = _positionAnchor; anchorBounds = _anchorBounds; relativePosition = _relativePosition; selectedAxis = _axis; relativeSingleSize = _relativeSize; customRatio = _customRatio; SetRelativeData(); }
public void TestSerialize() { Block root = new Block("root"); Number fromElem = new Number("from"); Blob ofElem = new Blob("of"); Relation r = new SizeRelation(fromElem); root.Add(fromElem); root.Add(ofElem); fromElem.relations.Add(r); ofElem.relations.Add(r); r.Of = ofElem; Block copy = root.Clone() as Block; Assert.NotNull(copy); }