User Tools

Site Tools


crpl:docs:settextanchor

<- CRPL reference <- Text Commands

SetTextAnchor

ArgumentsResultNotation
AnchorPoint s1 –
or
n1 –

Description

Sets the text anchor point of the text box in relation to the CRPL Core.

Valid string arguments are “UpperLeft”, “UpperCenter”, “UpperRight”, “MiddleLeft”, “MiddleCenter”, “MiddleRight”, “LowerLeft”, “LowerCenter”, and “LowerRight”. Valid numeric arguments are 0-8, with the same order as the listed string arguments (0 equals UpperLeft, 8 = LowerRight). Unrecognized strings or numbers are treated as UpperLeft or 0.

The AnchorPoint refers to the point on the text box that anchors to the CRPLCore. UpperLeft anchors the upper left corner of the text box to the CRPL Core, causing the text to display down and to the right of the CRPL Core.

The anchor point attaches to the center of the CRPL Core by default, but can be changed with SetTextX and SetTextY.

Examples

# Display text with the text box anchored on the LowerRight corner,
# making the text appear above and to the left of the CRPL Core.
"Hello Creeper World" SetText
"LowerRight" SetTextAnchor

# Warp notation
SetText("Hello Creeper World")
SetTextAnchor("LowerRight")
crpl/docs/settextanchor.txt · Last modified: 2021/02/05 11:44 by Karsten75