event

This function is triggered by left clicking with the mouse pointer anywhere within the panel bitmap, as long as no panel element (like a button) is hit. The panel pointer is passed as optional parameter to the function and can be used for determining which panel was clicked on.

Remarks

Example:

function redblue(PANEL* panel);  //prototype

PANEL* redpan = { x = 10; y = 20; bmap = redmap; event = redblue; }
PANEL* bluepan = { x = 10; y = 40; bmap = bluemap; event = redblue; }

function redblue(PANEL* panel)
{
   if (panel == redpan) { printf("redpan clicked!"); }
   if (panel == bluepan) { printf("bluepan clicked!"); }
}

See also:

PANEL, on_click, mouse_map, enable_mouse

► latest version online