Designing Games with Game Maker
Fonts and textIn games you sometimes need to draw texts. To draw a text you have to specify the font to use. Fonts can be defined by creating font resources (either in the Game Maker program or using the functions to create resources). There are different functions to draw texts in different way. In each function you specify the position of the text on the screen. There are two functions to set the horizontal and vertical alignment of the text with respect to that position.For text drawing the following functions exist:
draw_set_font(font) Sets the font that will be used when drawing text. Use -1 to set the default font (Arial 12). The following routines allow you to draw scaled and rotated text and also to use gradient colors on texts. These functions are only available in the Pro Edition!
draw_text_transformed(x, y, string, xscale, yscale, angle) Draws the string at position (x,y) in the same way as above, but scale it horizontally and vertically with the indicated factors and rotate it counter-clockwise over angle degrees.
|
Alternative versions
|
You can also read this manual on one single long page (± 1.5 mb) Also available in: ![]() Download helpfile
|





