This is the code that currently works for a single button:
BMAP* gpsfaset_bmp = "gpsfasetup.bmp";
BMAP* quitprogrambutt_bmp = "quitprogrambutt.bmp";
(The following BMAP* is for a second button)
BMAP* runanalysisbutt_bmp = "runanalysisbutt.bmp";
PANEL* gpsfasetup_pan =
{
layer = 0;
bmap = gpsfasetup_bmp;
button(0,0,quitprogrambutt_bmp,NULL,NULL,quitprogram,NULL,NULL);
flags = SHOW;
PANEL* quitprogrambutt_pan
{
pos_x = 220;
pos_y = 550;
layer = 10;
bmap = quitprogrambutt_bmp;
flags = SHOW;
function quitprogram()
{
sys_exit(NULL);
}
The above code for one button works. But need to add more buttons.The button BMAP runanalysis_bmp needs to run the runanalysis function, for example. Thus, adding a additional button function would seem sensible:
button(0,0, runanalysisbutt_bmp,NULL,NULL,runanalysis,NULL,NULL;
PANEL* runanalysisbutt_pan;
{
pos_x = 80;
pos_y = 550;
layer = 10;
bmap = runanalysis_bmp;
flags = SHOW;
}
This additional code does NOT work. The runanalysis button appears, but calls the quitprogam function, not the runanalysis function as coded. The quitprogram button works properly.