YoYo Games Wiki

draw_text_ext(x,y,string,sep,w)

From YoYoGames Wiki

Description

draw_text_ext works exactly like draw_text but has two extra options: set the distance between lines and width of text.

Arguments

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

Explanation

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

Example

Suppose you are drawing a lot of text:

draw_text_ext(0,0,longstring,10,room_width);

Remarks

Content from GMKB, was used to expand this article. The content was contributed by nickydude.