drawString on multiple lines?

Hello, new here and really liking OF so far!

I have a small question. I’m not sure if there’s an easy way to do what I’m trying.

I need to draw a string on multiple lines if the length of the string exceeds the screen resolution (so that all of the string can be read).

So I’m using the stringWidth function to find the length in pixels:

questionLength = franklinBookSmall.stringWidth(questionString);  

Then just drawing it:


So I want to draw the string on multiple lines if the questionLength > screenWidth

Is there any easy way? I can’t think how to insert a new line in the right place, I guess I’m hoping OF already has something I can use.


I didn’t try it for myself but this seems what you need:


Thanks, that looks good I’ll try it out.