GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2013-11-27 04:38:02

BobFrank
Member
Registered: 2013-11-27
Posts: 1

Find the x co-ordinate of the end of the second line of a drawn string

How can I determine the x co-ordinate of the end of the second or third line of a string called g_current_message which has been drawn using draw_text? For example:

g_current_message = "This is line one.
This is line two.
This is line three.
"

draw_text_ext(20,194,g_current_message,9,-1)


string_width(g_current_message) only returns the x co-ordinate for the end of the first line. How would I find the x co-ordinate of the second or third lines?

Offline

Board footer

Powered by FluxBB