draw_set_valign

Aligns any subsequently drawn text vertically.

Syntax:

GML Code Example

draw_set_valign(valign);


Argument Description
valign Vertical alignment.


Returns: N/A


Description

This function is used to align text along the vertical axis and changing the vertical alignment will change the position and direction in which all further text is drawn, with the default value being fa_top. The following constants are accepted:

Constant Alignment
fa_top
fa_middle
fa_bottom


Example:

GML Code Example

draw_set_halign(fa_center);
 draw_set_valign(fa_middle);
 draw_text(100, 32, "Score: " + string(score));
 

The above code will draw the score centered around the very center of the text.


Next: draw_text



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here