Use a GuiInputCtrl:
...
new GuiInputCtrl(MyInputCtrl) {
profile = "GuiInputCtrlProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "0 0";
extent = "64 64";
minExtent = "8 8";
visible = "1";
helpTag = "0";
};
...
function MyInputCtrl::onInputEvent(%this, %device, %action) {
if( %device $= "mouse" && %action $= "button0" ) {
// CLICK
}
}