I'm working on a "full screen" HUD overlay using Gui controls.
I have a problem that I can't seem to figure out and I'd like other ideas if anyone has any.
The script:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.createOverhead();
}
function createOverhead()
{
new GuiControl(Overhead_Screen)
{
profile = "GuiControlProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
active = true;
new GuiControl(Overhead_Background)
{
profile = "GuiControlProfile";
useownprofile = true;
profile.opaque = true;
profile.fillColor = "0 0 0 128";
profile.borderColor = "0 0 0 255";
profile.border = 1;
position = "0 320";
extent = "640 160";
horizSizing = "width";
vertSizing = "top";
new GuiButtonCtrl(Overhead_MoveUp)
{
profile = "GuiButtonProfile";
position = "600 20";
extent = "40 40";
horizSizing = "left";
vertSizing = "top";
active = true;
};
new GuiTextEditCtrl(Overhead_Test)
{
profile = "GuiTextEditProfile";
position = "0 0";
extent = "100 20";
};
};
};
Overhead_Screen.resize(0, 0, screenwidth, screenheight);
GraalControl.makeFirstResponder(true);
}
I am using Overview_Screen basically as a "wrapper" to provide a resolution independant display. When the screen is resized it automatically resizes...
Now, the problem: the .makeFirstResponder(true); works nice and all, but once you focus the TextEdit control you cannot get focus back to the Graal control.
Does anyone know how I can basically make the GuiControl Overview_Screen pass all events to GraalControl?
I guess it's not much of a problem if I keep no focus grabbing GuiControls on the screen and have them in opened windows, but I'd like a proper solution than avoiding it.