draw_get_valign

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

 

Syntax:

draw_get_valign();

 

Returns:

Constant

Vertical Alignment Constant
Constant Alignment
fa_top fa_top example
fa_middle fa_middle example
fa_bottom fa_bottom example

 

Example:

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.