Relative
Primitives can be placed with respect to another one. The main way to do so is with:
PlaceRelative(ScreenPrimitivePtr A,ScreenPrimitivePtr other,placeX X,placeY Y,scalar paddingX,scalar paddingY)
ScreenPrimitivePtr Aprimitive to place wrt to BScreenPrimitivePtr otherreference PrimitiveplaceX Xcan be:REL_LEFT, ABS_LEFT, CENTER_X,SAME_X,REL_RIGHT,ABS_RIGHTfor exampleREL_Xwill place A to the left of B,ABS_RIGHTwill place A to the right of the screenplaceY Ycan be:REL_TOP, ABS_TOP, CENTER_Y,SAME_Y,REL_BOTTOM,ABS_BOTTOMscalar paddingXoffset in the opposite direction of the placeX in the x-coordscalar paddingYoffset in the opposite direction of the placeY in the x-coord
Dynamic tracking
The relative placement is dynamic, if the reference primitive moves, the placement is updated:
Of course, many wrappers exist over this to simplify stuff for common constructions:
Wrappers:
PlaceNextTo(ScreenPrimitivePtr ptr,int side,scalar paddingx = 0.01,ScreenPrimitivePtr other = nullptr)
side 0 = left, side 1 = right
PlaceBelow(ScreenPrimitivePtr ptr,ScreenPrimitivePtr other,scalar paddingy = 0.01)
PlaceAbove(ScreenPrimitivePtr ptr,ScreenPrimitivePtr other,scalar paddingy = 0.01)