Page 1 of 1

Problem with empty lines

Posted: Thu Mar 31, 2005 09:15
by sphinkie
Hi

I have a problem with empty lines in CEGUI.When I write:

Code: Select all

pText->setText("line1\nline2");

I have the right result:

line1
line2


but when I write:

Code: Select all

pText->setText("line1\n\nline2");

or:

Code: Select all

pText->setText("line1\n \nline2");

or even:

Code: Select all

pText->setText("line1\n \t \n line2");


The empty lines are ignored, and I still have :

line1
line2


(I am using the version included in ogre 1.0)

Is that a bug, and is there a workaround ?

Thanks

Re: Problem with empty lines

Posted: Thu Mar 31, 2005 09:54
by Guest
Indeed there's a small bug here.
Looks like the bug is only appearing with WordWrap formatting. I made the same test with LeftAligned text and everything was fine (i got a new line in the middle of my text). It could help you until the bug is corrected (i'll try to have a look at the code over the week end).

--
Chris

Re: Problem with empty lines

Posted: Fri Apr 01, 2005 19:07
by sphinkie

Code: Select all

pText->setHorizontalFormatting(CEGUI::StaticText::LeftAligned);


works well
thanks

Re: Problem with empty lines

Posted: Fri Apr 01, 2005 22:46
by Guest
I submitted a tiny patch to correct this bug.

--
Chris