Set Text Alignment


Description

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:

Left Align Text is horizontally aligned to the left
Center Align Text is horizontally aligned to the center
Right Align Text is horizontally aligned to the right
Top Align Text is vertically aligned to the top
Middle Align Text is vertically aligned to the middle
Bottom Align Text 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 Syntax


Arguments:

Argument Description
H.Align The horizontal alignment value (Left, Center, Right)
V.Align The vertical alignment value (Top, Middle, Bottom)


Example:

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