MultiLineEditbox::formatText question

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

haihuojiming
Just popping in
Just popping in
Posts: 10
Joined: Tue Jul 01, 2008 07:57

Postby haihuojiming » Sun Dec 07, 2008 15:40

I read the code again ,
if i use setWordWrapping(false), the new line only do;t create until a '\n' is given.

in fact if i edit the TextUtils::DefaultWrapDelimiters(" \n\t\r") to TextUtils::DefaultWrapDelimiters("") , my problem is over.

but the important thing i wanted to know is that why we use the " \n\t\r" to wrap the string, and when we discuss the issue, i get it.

there are some differents between our mode of text writen.
it's a interesting to me too.

:D

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

Postby CrazyEddie » Mon Dec 08, 2008 12:59

haihuojiming wrote:if i edit the TextUtils::DefaultWrapDelimiters(" \n\t\r") to TextUtils::DefaultWrapDelimiters("") , my problem is over.

Hmm. This is probably something that we should make user configurable.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Postby Jamarr » Mon Dec 08, 2008 16:47

haihuojiming wrote:I read the code again ,
if i use setWordWrapping(false), the new line only do;t create until a '\n' is given.

in fact if i edit the TextUtils::DefaultWrapDelimiters(" \n\t\r") to TextUtils::DefaultWrapDelimiters("") , my problem is over.

but the important thing i wanted to know is that why we use the " \n\t\r" to wrap the string, and when we discuss the issue, i get it.

there are some differents between our mode of text writen.
it's a interesting to me too.

:D


My bad! I assumed the CEGUI editbox fell back to letter-wrapping, but instead it just adds a horizontal scrollbar. I'm glad you figured out how to configure the editbox to do this.

CrazyEddie wrote:
haihuojiming wrote:if i edit the TextUtils::DefaultWrapDelimiters(" \n\t\r") to TextUtils::DefaultWrapDelimiters("") , my problem is over.

Hmm. This is probably something that we should make user configurable.


This should definitely be a property or something.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 2 guests