GM: draw text ext

From GMpedia.org Wiki

Jump to: navigation, search
The correct title of this article is draw_text_ext(x,y,string,sep,w). It appears incorrectly here because of technical restrictions.
The correct title of this article is draw_text_ext. It appears incorrectly here because of technical restrictions.


Arguments

x = Horizontal position (in pixels) on screen. y = Vertical position (in pixels) on screen. string = The thing you want displayed on screen. sep = Distance between lines in multi lined text. w = Width of text line (in pixels).

Limitations

must be Draw Event or used with Surfaces.

Note: Please remove limitations and port them in the "Remarks" section at the end of the article.

draw_text_ext works exactly like draw_text but two extra options, sep is the amount of 'gap' to leave between each line of text, a bit like line spacing, for the default spacing, use -1. w is the width of the line (in pixels) before it wraps around to the next line

[edit] Example

Suppose you are drawing a lot of text:

draw_text_ext(0,0,longstring,10,room_width);
This article was originally found at the Game Maker Knowledge Base, contributed by nickydude.
See the talk page for details
Personal tools