Game Development Community

Problem with adding HUD elements

by Patrick Shaw · in Torque Game Builder · 03/05/2006 (5:00 pm) · 2 replies

Hi all,
I am trying to dynamically create HUDs based on the number of players. I've tried tacking this problem three different ways with mixed results:

If I use "canvas.add(%controlName);" the HUD displays correctly. However, the mouse callback stop working.

If I use "gui_mainScreen.add(%controlName)" or "%player.attachGui(%controlName, sceneWindow2D);", the mouse callbacks work correctly. However, the HUD becomes a transparent box with a hair thin outline.

Any ideas?

Patrick

#1
03/07/2006 (6:24 am)
I belive this mouse events has something to do with the profile for the gui, look for something like firstreponder and set it to true
#2
03/08/2006 (9:20 am)
Anthony, I
I tried:
gui_mainScreen.makeFirstResponder(true);

and
%controlName.makeFirstResponder(false);
gui_mainScreen.makeFirstResponder(true);


In both cases, the mouse callback does not work. Do you have any other ideas?