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.
|