StaticText Formatting incorrect.

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
rick
Just popping in
Just popping in
Posts: 4
Joined: Mon Aug 15, 2005 07:51

StaticText Formatting incorrect.

Postby rick » Mon Aug 15, 2005 19:21

i setting StaticText fromat with the code

setFormatting(StaticText::HorzFormatting::WordWrapLeftAligned ,StaticText::VertFormatting::TopAligned);


but just working fine at Latin character string,can't auto wrap in chinese character string.

what warning?

User avatar
J_A_X
Quite a regular
Quite a regular
Posts: 72
Joined: Wed Jun 29, 2005 13:18
Contact:

Re: StaticText Formatting incorrect.

Postby J_A_X » Mon Aug 15, 2005 19:44

I don't think you have you go through HorzFormatting or VertFormatting for the format type. They just need it to be of HorzFormatting or VertFormatting type.

Try the following instead:

Code: Select all

setFormatting(StaticText::WordWrapLeftAligned ,StaticText::TopAligned);


If that doesn't work, show us more code and log file

User avatar
rick
Just popping in
Just popping in
Posts: 4
Joined: Mon Aug 15, 2005 07:51

Re: StaticText Formatting incorrect.

Postby rick » Mon Aug 15, 2005 21:25

Doesnot wroking.


there code working fine.
msgbox = (StaticText *) WindowManager::getSingleton().createWindow((utf8*)"WindowsLook/StaticText", (utf8*)"message_msgbox" ) ;
panel->addChildWindow(msgbox);
msgbox->setPosition(Point(0.1,0.1));
msgbox->setSize(Size(0.8,0.6));
msgbox->setFont(gfont);
msgbox->setFrameEnabled(false);
msgbox->setBackgroundEnabled(false);
msgbox->setFormatting(StaticText::WordWrapLeftAligned ,StaticText::TopAligned);
msgbox->setText((utf8*)"Crazy Eddie's GUI System is a free library providing windowing and widgets" ) ;



the result is
Image

just change to
msgbox->setText((utf8*)"你说你是我的传说,让他天长地久,我不知道怎么说了~" ) ; //chinese character string


the result is incorrect,not auto wrap,just one line

Image


why just working for latin character?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: StaticText Formatting incorrect.

Postby lindquist » Mon Aug 15, 2005 21:55

Are there any spaces in that string ?

User avatar
J_A_X
Quite a regular
Quite a regular
Posts: 72
Joined: Wed Jun 29, 2005 13:18
Contact:

Re: StaticText Formatting incorrect.

Postby J_A_X » Tue Aug 16, 2005 14:10

I think lind is right, i'm pretty sure you need a space to get wordwrap to work. (Though it would be a nice little thing to implement in CEGUI, no space wordwrap)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: StaticText Formatting incorrect.

Postby CrazyEddie » Thu Aug 18, 2005 13:08

We currently use some basic codes for whitespace (pretty much just: ' ', \n, \t). I have not gone into the specifics of this particular issue, though basically, until full unicode support is added there will be glitches like this.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 10 guests