Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-29-2006, 09:35 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Giving focus back to GraalControl

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(00screenwidthscreenheight);
  
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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.