View Single Post
12-29-11, 03:46 AM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
You could use an OnUpdate script which checks, say, every .05 seconds for GetMouseFocus() (or GetMouseFocus():GetParent(), depending on subframes). If the return value isn't your panel, then add the time since last update to a total. If it is, then the total is reset. If the total exceeds 3, stop the OnUpdate timer, reset the time since last update and total and hide the panel.

Also, perhaps easier, you can use the OnLeave function to start an OnUpdate script which counts to 3, and is cancelled only by OnEnter.

Last edited by Haleth : 12-29-11 at 03:50 AM.
  Reply With Quote