draw_get_halign

This function is used to get the text alignment setting along the horizontal axis, and will return one of the constants listed below.

 

Syntax:

draw_get_halign();

 

Returns:

Constant

Constant Alignment
fa_left fa_left example
fa_center fa_center example
fa_right fa_right example

 

Example:

if draw_get_halign() != fa_left
    {
    draw_set_halign(fa_left);
    }
draw_text(100, 32, "Score: " + string(score));

The above code will check to see if the current text alignment is left-aligned, and if it's not then it will be set and then some text is drawn.