View Single Post
  #4  
Old 11-29-2007, 02:57 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by cbkbud View Post
Isn't this what addControl is for?

If not, someone please explain it to me?

I would go with the above, doing a catchevent in each one.
No, addControl is used to make a gui control a child of another gui control.
So, for example:
PHP Code:
new GuiControl(Bla) {
  
//stuff
  
new GuiWindowCtrl(LOL) {
    
//stuff
  
}

Would be the same, output-wise, as
PHP Code:
new GuiControl(Bla) {
  
//stuff
}
new 
GuiWindowCtrl(LOL) {
  
//stuff
}
GuiControl.addControl(LOL); 
But it's generally not used that way. Usually it's used if you want to use a for loop to create several gui objects, or just in any case where a gui object is created after the initial parent is made.

But yeah, no problem Dusty. There's no shame in asking the forums!
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote