-
Notifications
You must be signed in to change notification settings - Fork 0
String_width_ext_line
hpgDesigns edited this page Aug 8, 2021
·
1 revision
NOTOC
Returns the width of a specific line in a multiline string. line starts at 0 (so 0 is the first line, 1 is the second and so on). w is the width of the text in pixels. Lines that are longer than this width are split up at spaces. Use -1 to not split up lines. To know how many lines does the string have you can use .
- string: The string for which the width should be returned.
- w: Width of the text in pixels. Lines that are longer than this width are split up at spaces. Use -1 to not split up lines.
- line: The line for which the width should be returned.
Returns the width in pixels.
//draws a line above the first line of the string
draw_text_ext(10,10,"Some text that is quite long and keeps on going",-1,200);
w=string_width_ext_line("Some text that is quite long and keeps on going",200,0);
draw_line(10,10,10+w,10);This is number 1