[solved] Setting multi font/color text on existing widgets?


09-12-2008 13:04:52


i have a question about changing the text of an existing widget. I am using Ogre 1.6 and QuickGUI_8_12.

For example the QuickGUI::Label class has different setText methods that i can use to define a new text (erasing the old text). I look for a way to access/create different text segments for existing widgets in a way similar to the mechanism used during widget creation (textDesc).

For example i want to display the text "red green blue" using different colours for each word. i managed to accomplish this during widget creation but not for existing widgets.

I hope i haven't missed something obvious. Thanks in advance.

Thanks to kungfoomasta and all other contributors for the great work on QuickGUI! :)


09-12-2008 18:05:03

I think I missed this! I remember adding in a setText method that takes a vector of TextSegment objects, but I didn't add it to all text widgets. I'll add that to my list of things to complete for next release. I think an "addText" function would also make things more convenient.


09-12-2008 20:34:39

Thanks for the fast response! Ok, i will wait patiently for the next release :)

Keep up the great work on QuickGUI!!!


02-01-2009 15:07:49

Problem solved :) Thanks, for the clearText() and addText() methods in QuickGUI 8.12!