pan_setbutton(PANEL*, var num, var type, var x, var y, BMAP* bmapOn, BMAP* bmapOff, BMAP* bmapOver, BMAP* bmapOverOff, void* functionClick, void* functionLeave, void* functionOver);

Adds or modifies a push, toggle, or radio button on a panel. LC


PANEL* Panel pointer.
num Number of an existing button (1 = first button of the panel), or 0 for adding a new button to the panel.
type Type of the button, 0 = push, 2 = toggle, 4 = radio.
x, y, ... Parameters similar to the button element, but with the parameter types given above.


Number of the button, or 0 if the button could not be found or created.


BMAP* clicked_pcx = "clicked.pcx";
BMAP* over_pcx = "over.pcx";
BMAP* normal_pcx = "normal.pcx";

PANEL* main_pan = { bmap = "main.pcx"; flags = SHOW; }

function exit_program() { sys_exit(NULL); }

function main()
  mouse_mode = 4; // activate mouse
  pan_setbutton(main_pan,0,0, // set a new push button for quitting the game

See also:

PANEL, button, button_state, pan_setslider, pan_setpos

► latest version online