Page 1 of 1

color Tags MultiLineEditbox ?

Posted: Mon Nov 29, 2010 05:59
by cCj
Hello

can you use the color tags in MultiLineEditbox ? i tried using the tags but nothing changes.

log:

Code: Select all

02/12/2010 05:22:17 (Std)    ---- Version 0.7.4 (Build: Oct 11 2010 Microsoft Windows MSVC++ 10.0 32 bit) ----
02/12/2010 05:22:17 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based 2nd generation renderer module.  TextureTarget support enabled via FBO extension. ----
02/12/2010 05:22:17 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
02/12/2010 05:22:17 (Std)    ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
02/12/2010 05:22:17 (Std)    ---- Scripting module is: None ----




The code from tutorial :

Code: Select all


CEGUI::Window* textComponent = 
(CEGUI::Window*)CEGUI::WindowManager::getSingleton().getWindow("SomeMultilineEditbox"); // except im not trying this on statictext
textComponent->setText("This is just some text that shows how nicely [colour='FFFF0000']CEGUI
can format strings.[colour='FF00FF00'] and this is just colour [colour='FF0000FF'] formatting!");



gives this result:

Image

ty

Re: color Tags MultiLineEditbox ?

Posted: Tue Nov 30, 2010 01:33
by Jamarr
Maybe.

Re: color Tags MultiLineEditbox ?

Posted: Tue Nov 30, 2010 01:45
by cCj
Jamarr wrote:Maybe.


I know for a fact that it isnt working...

does the multiLineEditbox need some property or something to be set?

Re: color Tags MultiLineEditbox ?

Posted: Wed Dec 01, 2010 16:52
by cCj
Hi
i tried this code from tutorial:

Code: Select all


CEGUI::Window* textComponent = 
(CEGUI::Window*)CEGUI::WindowManager::getSingleton().getWindow("SomeMultilineEditbox"); // except im not trying this on statictext
textComponent->setText("This is just some text that shows how nicely [colour='FFFF0000']CEGUI
can format strings.[colour='FF00FF00'] and this is just colour [colour='FF0000FF'] formatting!");




but the tags show up and text is not colored.


could it be problem with the font?

Re: color Tags MultiLineEditbox ?

Posted: Sun Jan 23, 2011 22:17
by cCj
still have this problem. updated orginal post with more detail.

Re: color Tags MultiLineEditbox ?

Posted: Mon Jan 24, 2011 15:31
by Jamarr
As per this thread, the MLEB was not updated to make use of the new FormattedRenderedString component.

You only have a few options 1) wait for the CEGUI team to add support for FormattedRenderedString to Editbox widgets 2) add this support yourself 3) use the MLEB widget for editing, and a StaticText widget for display.

For example: create a layout with a StaticText widget with an overlapping MLEB widget. Hide the MLEB widget by default. When the StaticText widget is clicked, copy the StaticText text to the MLEB widget. When the user is finished editing the text in the MLEB (say by clicking anywhere outside the widget) copy the MLEB text back to the StaticText widget, and then hide the MLEB widget.

Re: color Tags MultiLineEditbox ?

Posted: Thu Jan 27, 2011 02:37
by cCj
Does StaticText have multilple lines like MLEB ?

and can it be scrolled in scroll box?

Re: color Tags MultiLineEditbox ?

Posted: Thu Jan 27, 2011 14:34
by Kulik
Yes, StaticText is very powerful despite it's name :-)

Re: color Tags MultiLineEditbox ?

Posted: Thu Jan 27, 2011 21:50
by cCj
Ok ty! thats all i need. but the scrollbar doesnt work with the statictext. im adding text with Window->appendText()

Re: color Tags MultiLineEditbox ?

Posted: Fri Jan 28, 2011 00:10
by Kulik

Re: color Tags MultiLineEditbox ?

Posted: Fri Jan 28, 2011 18:35
by cCj
thx man so scrollbar needed to be enabled for this one.

Sometimes CEGUI is difficult to take in use but its good GUI!