text split problem in void RenderedString::split(...);

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

wang37921
Just popping in
Just popping in
Posts: 20
Joined: Thu Dec 24, 2009 11:22
Contact:

text split problem in void RenderedString::split(...);

Postby wang37921 » Thu Jul 08, 2010 02:01

CEGUIRenderedString.cpp line number :199

Code: Select all

RenderedStringComponent* lc =
    c->split(split_point - (partial_extent - c->getPixelSize().d_width),
                true);
//RenderedStringComponent* lc =
//   c->split(split_point - (partial_extent - c->getPixelSize().d_width),
//   idx == 0);


when
the content is "[image='set:someset image=someimage']asdasdasdasdasd", the RenderedStringTextComponent is too big that the line couldn't accept it.

RenderedStringTextComponent cannot be split, if his second param is false.
the second param has no use here, i think.(am i wrong?ce~) :oops:
i have tried, it works.

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

Re: text split problem in void RenderedString::split(...);

Postby CrazyEddie » Thu Jul 08, 2010 09:37

I don't understand. What happens (or does not happen)? And how does this differ from what you think should happen? Which version of the code is this?

Also, is the image tag here:
the content is "[image='set:someset image=someimage']asdasdasdasdasd",

what you actually have? Since it's not in the correct form. Is it a mistake, or is it part of reproducing the issue?

CE.

wang37921
Just popping in
Just popping in
Posts: 20
Joined: Thu Dec 24, 2009 11:22
Contact:

Re: text split problem in void RenderedString::split(...);

Postby wang37921 » Thu Jul 08, 2010 12:27

add some code in sample_firstWindow

Code: Select all

   Window* lab = winMgr.createWindow("TaharezLook/StaticText", "Demo Lab");
   wnd->addChildWindow(lab);
   lab->setArea(URect(cegui_absdim(10), cegui_absdim(10), cegui_absdim(100), cegui_absdim(200)));
   ImagesetManager::getSingleton().create("DriveIcons.imageset");
   lab->setText("[colour='FFFF00FF'][image='set:DriveIcons image:Silver']helloStaticText");

my english is poor, so....add some image to explain.

before modify, the code and result image is below.

Code: Select all

RenderedStringComponent* lc =
   c->split(split_point - (partial_extent - c->getPixelSize().d_width),
   idx == 0);

Image


modify below code, the result image as below.

Code: Select all

RenderedStringComponent* lc =
    c->split(split_point - (partial_extent - c->getPixelSize().d_width),
                true);

Image
i'm not sure you can see the image...

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

Re: text split problem in void RenderedString::split(...);

Postby CrazyEddie » Mon Jul 12, 2010 08:45

Well, the top image is how it's supposed to be ;)

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 21 guests