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.