View Single Post
  #1  
Old 04-05-2011, 12:05 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
gui and catchevent question

In my scrolls I use a textctrl and set it's modal to false so I can get the event from just the scroll behind. textctrl won't return the events when I test it (modal is false) but still does block the scrollctrl preventing me from catching onmousedown

PHP Code:
//Snippet
        
new GuiScrollCtrl( "Keyboard_" @ temp.a @ "_" @ temp.b)
        {

          
useOwnProfile  = true;
          
profile        = "GuiScrollProfile";
          
profile.border = 4;
          
profile.bitmap = "guiglife_keyscroll.png";
          
position       = {( temp.a == 1 && temp.b > 0)? ( 24 + 44 * temp.b): ( temp.a == 2 && temp.b > 0)? ( 40 + 44 * temp.b): ( temp.a == 3 && temp.b > 0)? ( 48 + 44 * temp.b): ( 0 + 44 * temp.b), 0 + 44 * temp.a};
          
extent         = {( temp.key == ">>")? 64: ( temp.key == "<<")? 64: ( temp.key == "Backspace")? 128: ( temp.key in { "Upper", "Lower"})? 80:( temp.key == "Enter")? 156:( temp.key == "Shift")? 88:( temp.key == "Space")? 148: 40, 40};
          
vscrollBar     = hscrollBar = "alwaysOff";
          
thiso.catchEvent( this, "OnMouseDown", "KeyboardDown");
        
          new 
GuiTextCtrl( "Keyboard_" @ temp.a @ "_" @ temp.b @ "_Text")
          {
          
            
useownProfile        = true;
            
position             = { -2, -14};
            
width                = ( "Keyboard_" @ temp.a @ "_" @ temp.b).width; 
            
text                 = temp.key;
            
profile.fontColor    = { 255, 255, 0, 205};
            
profile.fontSize     = 24;
            
profile.fontStyle    = "cb";
            
profile.fontType     = "Arial";
            
profile.shadowOffset = { 2, 2};
            
profile.shadowColor  = { 0, 0, 0};
            
profile.align        = "center";
            
profile.textShadow   = true;
            
profile.modal        = profile.autoSizeWidth = false;
            
useOwnProfile        = true;
            
          }
        } 
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote