pan_setevent problem

Posted By: amadeu

pan_setevent problem - 10/06/07 19:54

Hallo

I am creating in my game panels with buttons dinamically with pan_create function. I have one array of string with the name of the events an to set the events in each button I used pan_setevent function but the event did not work. My code is:

PANEL* panel2D[200];
STRING* NameEvent[200];
for (i= 0; i<200; i++)
{
pan_setevent(panel2D,3,1,NameEvent);
}

What is the wrong here? The "void* event" in pan_setevent function do not accept String type?

thx
Posted By: Spirit

Re: pan_setevent problem - 10/07/07 08:42

A String is something that contains text like "This is a string" and an event is a function that lets something happen, so you should decide first what you want to do when someone hits that button, and then write a function for it, and then you can assign the function to the button like

pan_setevent(mypanel,3,1,myfunction);

Hope this helps.
Posted By: amadeu

Re: pan_setevent problem - 10/07/07 08:49

ok.

thanks

But I take the "myfunction" from one XML file dinamically and when I take this function, it is one String type and the pan_setevent do not accent (the game close)
I want to know if I could set myfunction in pan_setevent with String word.

thx
© 2024 lite-C Forums