I saw a long discussion in the suggestions forum about implementing multiple colors in a single text string. Is there already functionality that allows for differing colors on a per-line basis for the MultiLineEditbox? With the existing properties, I can change the color for all the text at once, but not for each line. Would I need to delve into the CEGUI::MultiLineEditbox code myself to add this functionality?
Thanks!
MultiLineEditbox and font colo(u)r
Moderators: CEGUI MVP, CEGUI Team
pretty sure you can set various colors per item; for example, I use this code to set the text-color to black, the blackground to white, and selection-colour to blue:
Code: Select all
CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem("blah");
item->setTextColours(CEGUI::colour(0,0,0,1));
item->setSelectionBrushImage(CEGUI_SKIN, "Background");
item->setSelectionColours(CEGUI::colour(.12f,.12f,1,1));
CEGUI::uint row = mcl->insertRow(n);
mcl->setItem(item, CEGUI::MCLGridRef(r, 0));
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
That's all true, but if you meant multi coloured text like this then currently that's not easily done, though a basic implementation should be added for the 0.7.0 release - and better than that, it will be customisable, so if you need something a bit special you will be able to provide an object to do that.
HTH
CE.
HTH
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: Google [Bot] and 9 guests