Game Development Community

Questions about the chat hud

by Rodney (OldRod) Burns · in Torque Game Engine · 02/14/2003 (8:46 pm) · 2 replies

I'm trying to move the chat hud to the bottom center of the screen, but I'm not able to do it. In the GUI editor, I see several pieces all nested within each other, but moving them around doesn't let me get the window moved to where I want it.

Can anyone give me some tips on deciphering this gui element? There's a "GuiNoMouseCtrl" that seems to be a container for the actual window. What does this do?

What do I have to do to actually move the chat window were I want it? :)

#1
02/14/2003 (9:38 pm)
I am also interested in this. I hope someone could give us a hand.

Thanks in advance.

Alex

P.S.
I have a feeling that this is easy, its just eluding us n00b's. :D
#2
02/15/2003 (5:52 pm)
Yes, it's actually as easy as you'd think :)

Generally, the GUI is structured in a Parent/Child type tree. Meaning, you can trace it all the way back up to a single parent. For instance if you had 3 elements:

Parent(located at 0,0)
->Child(located at 50,50)
->Grandchild(located at 25,25)

The grandchild is located at an offset of 25,25 of the child, but (and this should be obvious) the Grandchild is located 75, 75 from the parent.

Having this type of setup makes it easy to move around the entire window, by adjusting one value. In your case, the very Top parent of the chat HUD is GuiNoMouseCtrl

If you change the GuiNoMouseCtrl to Position = 50,50 it will move everything below him to the correct location.

Hope this makes sense.