Next Line ~n with DrawText

Monkey Forums/Monkey Programming/Next Line ~n with DrawText

xzess(Posted 2011) [#1]
Hi,

how can i realise a next line with DrawText() ?
im using AngelFont, i was not able to recreate the example with the multiline string

Im loading the string with LoadString which links to a multiline text
Local str:String=LoadString("mytext.txt")


Then i draw it with
Local font:AngelFont

Method OnRender()
font.DrawText()
End


When i try to use .DrawHTML() it crashes (NULL error)
The example works just fine

Did i miss something?


Thanks for help!


anawiki(Posted 2011) [#2]
Take a look at simpletextbox.monkey file in AngelFont example. It handles new lines. Standard drawtext method doesn't take care of this.


Bladko(Posted 2011) [#3]
look into my code in code samples regarding printing text with ~n