Yeah that's how i've been using it, and it just treats the \n as a space basicallybitplane wrote: using guiStaticText->setText(L"Some\nNewline") works fine for me, how were you using it JP?
wchar_t new line?
This:
...is what I get when I do:
Now granted that's a listbox (dunno how those work with linefeeds) but it's the same thing that happens to the staticText's.
...is what I get when I do:
Code: Select all
lstLoginStatus->addItem(L"Logging in \n to the server...");
Last edited by Rytz on Tue Oct 31, 2006 10:37 pm, edited 1 time in total.
List boxes don't work with line feeds. I don't think I've ever seen a listbox that did. For the static text to work, the wordWrap flag has to be set. At least on vc7 it does...
BTW, the static text appears to have a bug in that it doesn't split words/strings when they are wider than the width of the static text area.
BTW, the static text appears to have a bug in that it doesn't split words/strings when they are wider than the width of the static text area.
wchar_t is generally a pain to work with for me. Let me add a question to this line. This is just C++ (maybe C) and not Irrlicht
I'd like to tell the gui static text to display a varying number (say camera location or something)
I can tell it to set text to L"camera location" but how can I stick a number on it? I could do this with a std::string but how do you convert from string to wchar_t?
I'd like to tell the gui static text to display a varying number (say camera location or something)
I can tell it to set text to L"camera location" but how can I stick a number on it? I could do this with a std::string but how do you convert from string to wchar_t?