Escape Sequences, Some Don't Work For Me

BlitzMax Forums/BlitzMax Beginners Area/Escape Sequences, Some Don't Work For Me

Augen(Posted 2006) [#1]
Within text, the ~n and ~r don't seem to make a newline or return. The ~q works, so I know the placement of the sequence is correct. They work with Print command in the console, maybe they aren't supposed to work with Graphics and DrawText? Any suggestions?

Graphics 800,600

While Not KeyHit(key_escape)
DrawText("this is a test of ~n newline, ~r return, and ~q quotation mark escape sequences",100,10)
Flip
Wend



Regular K(Posted 2006) [#2]
Try ~r~n


FlameDuck(Posted 2006) [#3]
maybe they aren't supposed to work with Graphics and DrawText?
Bingo.


Omni(Posted 2006) [#4]
I hate to bump something so old, but I was trying this very thing. Is there a way around it that I could try to format my DrawText with newlines?


FlameDuck(Posted 2006) [#5]
You could split the line yourself into 2 different DrawTexts.


grable(Posted 2006) [#6]
Heres som old code i had lying around (modified slightly to support newlines) if anyone wants.

This draws text inside a frame and wraps on words/cr.

Hope it helps =)