|
|
Re: how to add parameters to functions invoked from button events?
[Re: GMorningEstrela]
#301494
12/11/09 03:09
12/11/09 03:09
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
heya
PANEL* pnl_add = {
button(250, 134, "add1.pcx", "add2.pcx", "add3.pcx", add, NULL, NULL);
flags = SHOW;
}
int add(var id, PANEL* pnl){
switch(id){ //choose button
case 1:
return(value);
break; //case 1; add button
} //switch(id)
} //add(id, pnl)
though you'll need some global variables for the function to know what to add, panel buttons only pass button number and panel through parameters what exactly are you trying to do?
|
|
|
|