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();
Horizontal Alignment Constant | |
---|---|
Constant | Alignment |
fa_left | ![]() |
fa_center | ![]() |
fa_right | ![]() |
var _cur_halign = draw_get_halign();
var _cur_valign = draw_get_valign();
draw_set_halign(fa_right);
draw_set_valign(fa_bottom);
draw_text(100, 32, "Score: " + string(score));
draw_set_halign(_cur_halign);
draw_set_valign(_cur_valign);
The above code saves the currently applied "halign" and "valign" values to local variables, and then changes the alignments to draw some text. After drawing it, it resets the alignments back to the values stored in the local variables.