color Tags MultiLineEditbox ?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

color Tags MultiLineEditbox ?

Postby cCj » Mon Nov 29, 2010 05:59

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
Last edited by cCj on Sun Jan 23, 2011 22:15, edited 2 times in total.

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

Re: color Tags MultiLineEditbox ?

Postby Jamarr » Tue Nov 30, 2010 01:33

Maybe.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: color Tags MultiLineEditbox ?

Postby cCj » Tue Nov 30, 2010 01:45

Jamarr wrote:Maybe.


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

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

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: color Tags MultiLineEditbox ?

Postby cCj » Wed Dec 01, 2010 16:52

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?

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: color Tags MultiLineEditbox ?

Postby cCj » Sun Jan 23, 2011 22:17

still have this problem. updated orginal post with more detail.

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

Re: color Tags MultiLineEditbox ?

Postby Jamarr » Mon Jan 24, 2011 15:31

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.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: color Tags MultiLineEditbox ?

Postby cCj » Thu Jan 27, 2011 02:37

Does StaticText have multilple lines like MLEB ?

and can it be scrolled in scroll box?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: color Tags MultiLineEditbox ?

Postby Kulik » Thu Jan 27, 2011 14:34

Yes, StaticText is very powerful despite it's name :-)

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: color Tags MultiLineEditbox ?

Postby cCj » Thu Jan 27, 2011 21:50

Ok ty! thats all i need. but the scrollbar doesnt work with the statictext. im adding text with Window->appendText()

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: color Tags MultiLineEditbox ?

Postby Kulik » Fri Jan 28, 2011 00:10


cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: color Tags MultiLineEditbox ?

Postby cCj » Fri Jan 28, 2011 18:35

thx man so scrollbar needed to be enabled for this one.

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


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests