Game Development Community

N doesn't create a new line?

by Maddermadcat · in Torque Game Engine · 03/30/2008 (11:42 am) · 3 replies

For some reason, \n isn't working in my GUIs properly. In the console, I get this when I echo the string:

Text
Text
Text
Text

However, in a GuiTextCtrl, instead of each word being on a separate line, I simply get the unknown character symbol (a square) between them.

What went wrong?

#1
03/30/2008 (11:53 am)
Use a GuiMLTextCtrl instead of GuiTextCtrl.
#2
03/30/2008 (11:55 am)
I do not believe GuiTextCtrl supports multiple lines.

You can use a GuiTextListCtrl though. It still doesn't do anything fancy like wordwrap or newlines, its just a list.

eg.
%textlist.addRow(0,"Row1");
%textlist.addRow(1,"Row2");
%textlist.addRow(2,"Row3");
#3
03/30/2008 (12:09 pm)
I'll try using GuiMLTextCtrl.

James, I don't think the textlist would be very appropriate here, but thanks for the quick reply. :)

EDIT: Yeah, now it works perfectly. Thanks! :D