See here: http://www.conitec.net/beta/apanel-on_click.htm
Use (PANEL* panel) as a function argument and then you can use panel instead of my for various operations/ checks.
Keep in mind that ENABLE_CLICK is an emask flag, not an eflags. The is() macro only works for eflags, you have to check ENABLE_CLICK manually:

if(panel.emask & ENABLE_CLICK) ...


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends