Problem with empty lines

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
sphinkie
Just popping in
Just popping in
Posts: 8
Joined: Wed Jan 12, 2005 12:06
Location: Paris
Contact:

Problem with empty lines

Postby sphinkie » Thu Mar 31, 2005 09:15

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

Guest

Re: Problem with empty lines

Postby Guest » Thu Mar 31, 2005 09:54

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

User avatar
sphinkie
Just popping in
Just popping in
Posts: 8
Joined: Wed Jan 12, 2005 12:06
Location: Paris
Contact:

Re: Problem with empty lines

Postby sphinkie » Fri Apr 01, 2005 19:07

Code: Select all

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


works well
thanks

Guest

Re: Problem with empty lines

Postby Guest » Fri Apr 01, 2005 22:46

I submitted a tiny patch to correct this bug.

--
Chris


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests