Game Development Community

GuiMessageVector Help???

by Sean Pollock · in Torque Game Engine · 10/31/2003 (9:29 pm) · 2 replies

I am trying to figure this GuiMessageVector stuff out and have been beating my head over this for two days with no success. I was wondering if anyone can give an example on how to use this control and how to send text messages to this control and have it display.

I have looked at the ChatHud.gui and ChatHud.cs but it doesn't seem to work when I try using that as an example. when i type something like MyMessageVector.pushBackLine("Hello word!",0) nothing gets printed.

Is there any resources online or tutorials that talks about this control?

Any help would be appreciated.

Thanx

#1
10/31/2003 (11:59 pm)
Heres a short bit of info.

Say you have a guiMessageVector control:

new GuiMessageVectorCtrl(gmvText) {
               profile = "ircMLTextProfile";
               horizSizing = "width";
               vertSizing = "height";
               position = "1 1";
               extent = "400 150";
               minExtent = "8 8";
               visible = "1";
               helpTag = "0";
               lineSpacing = "0";
               lineContinuedIndex = "10";
               matchColor = "0 0 255 255";
               maxColorIndex = "9";
            };

Now you'll need to create a MessageVector to use with this control:


%c = new MessageVector(mvText){};

Now you need to attach the MessageVector to the GuiMessageVector control

gmvText.attach(mvText);

Now to add text you add it to the MessageVector

mvText.pushBackLine("Hello World!");


That should get you started
#2
11/01/2003 (1:56 pm)
Thanks Harold. I will try that when I get home from work.