Initial MessageHud Position
by Jeremy Alessi · in Torque Game Engine · 02/05/2006 (12:55 pm) · 1 replies
I have my MainChatHud centered up top on screen. I have also adjusted the code in MessageHud.cs so the MessageHud GUI element is centered and positioned directly under the MainChatHud element. It works fine whenever I press "u" to chat ... but only AFTER the first time.
The very first time I press "u" to chat the MessageHud gets offset down and to the right of the MainChatHud. I can't seem to find the place that would control this. I'm looking at the chatHud.gui file ... but nothing seems to help the MessageHud pop up where it should the first time it is invoked.
The very first time I press "u" to chat the MessageHud gets offset down and to the right of the MainChatHud. I can't seem to find the place that would control this. I'm looking at the chatHud.gui file ... but nothing seems to help the MessageHud pop up where it should the first time it is invoked.
About the author
Torque Owner Jeremy Alessi
Create the MessageHud GUI element after the MainChatHud element. Then set the MessageHud_Frame position field to:
Then in messageHud.cs change the MessageHud::open method so the window position and extents are:
It seems that getting the position and extent from the OuterChatHud ... just inside this open method causes the offset ... like it's done twice or something. I am also using relative for these elements.