Game Development Community

GuiMLTextCtrl tags.

by Peterjohn Griffiths · in Torque Game Engine · 10/04/2006 (8:54 pm) · 6 replies

Hi,
I have been trying to use the guiMLTextCtrl as it offers rich text.
I am able to set the colour of text by using with no problem. However I want to set the background colour. I had a look on WIKI again tdn.garagegames.com/wiki/GUI/Profiles/ControlList#GuiMLTextCtrl
but it doesn't list a background colour tag.
I decided to looked through the guiMLTextCtrl.cc for the answer and found that it processes a tag called shadowcolor: in the same way it processes the tag called color: so I set off trying to use it in the same way. However doesn't turn the background or anything else green.
Has anyone got any idea how I can make the background of a guiMLTextCtrl a different colour over some parts or all of the text inside it.
Many thanks in advance.

#1
10/04/2006 (9:44 pm)
It would appear after further investigation that needs to be used in conjunction with and the result is a shadow cast under any text that comes after it at the offset specified in (2:2 = x:y) in the colour specified in .
Looks like I was barking up the wrong tree so to speak.
I will look into how the highlighting works with the mouse as that seems to change the background colour the way I want it.
#2
10/05/2006 (12:01 am)
I think you can't set a background colour to the guiMLTextCtrl so have ended up creating a guiBitmapCtrl the same size first and then creating the guiMLTextCtrl infront of it.
Bit of a HACK but it looks OK.
I think I may look into updating some of these controls after I have finished my current game.
Need some standard methods and flexability built in as standard.
Anyway, Atleast I found a way of doing it.
If you have a better way, please post below.
Many thanks
#3
10/05/2006 (12:07 am)
You can set a fillColour just like any text control can, which basically is a background colour.
#4
10/05/2006 (12:42 pm)
I didn't see that in the C++ code.
That would be great.
How do you do it?.
#5
10/05/2006 (12:48 pm)
Look in the example scripts? 99% of all the GUI objects set it in their profile.
#6
10/06/2006 (1:44 am)
Thanks Stefan for pointing me in the right direction. :+}