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.


语法:

draw_get_halign();


返回:

常量

常量 Alignment
fa_left
fa_center
fa_right


例如:

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.