Set Text Alignment Icon Set Text Alignment

This action will set the font alignment for all subsequent draw text actions. You can set the horizontal alignment to be the left, center or right, and the vertical alignment to be top, middle or bottom and the text will be aligned relative to the x/y position of the draw action, as shown in the images below:

Align LeftText is horizontally aligned to the left
Align CenterText is horizontally aligned to the center
Align RightText is horizontally aligned to the right
Align TopText is vertically aligned to the top
Align MiddleText is vertically aligned to the middle
Align BottomText is vertically aligned to the bottom

Note that this will set the alignment to use for all subsequent draw text calls, and so can be called, for example, once at the beginning of the game - in any event, not just the Draw Event - and all draw text actions will use the set alignment. However if you require multiple draw text actions to align in different ways, then you will need to call this action before every draw text action you wish to align differently.

 

 

Action Syntax:

Set Text Alignment Action

Arguments:

ArgumentDescription
H.AlignThe horizontal alignment value (Left, Center, Right)
V.AlignThe vertical alignment value (Top, Middle, Bottom)

 

Example:

Set Text Alignment ExampleThe above action block code sets the font, the draw colour, and the alignment for some text that is drawn.