pan_setevent(PANEL*,var type,var num,void* event)

Replaces a function assigned to a panel element.

Parameters:

PANEL* Panel pointer.
type Element type: 3 = button
num Number of the element, starting with 1. The digit behind the decimal gives the number of the function to be set (e.g. 1.0 = functionOn, 1.1 = functionOff, 1.2 = functionOver of the first button).
event Function pointer.

Remarks:

The changed element is not saved by game_save.

Examples:

// change the On event of the first panel button
function byebye() { sys_exit(NULL); }
...
pan_setevent(mypanel,3,1,byebye); 

See also:

PANEL, BMAP, button, pan_setpos, pan_setbmap ► latest version online