sibarrick Posted October 3, 2005 Share Posted October 3, 2005 Hi, If you have a button as a multi-parameter how do you access it's id in the callback function? In PRM_Template it says the following // this is a call back function that can be used to modify data.// it is invoked when the user uses a parameter of type PRM_CALLBACK // (This might be a button, or a menu) index will contain the index // of the menu entry. // the return value should be 1 if you want the dialog to refresh // (ie if you changed any values) and 0 otherwise. typedef int (*PRM_Callback)(void *data, int index, float time, const PRM_Template *tplate); So you can get the index of the menu item but not the index of the actual instance of the button being click on. So how do you get that index? With most types of parameter you can just loop through them all and quiry the value but with buttons you can only do something when they are used, but then how do you know which one it is? ta Si Quote Link to comment Share on other sites More sharing options...
sibarrick Posted October 3, 2005 Author Share Posted October 3, 2005 Of course as soon as I post this I find the answer getToken is a member of PRM_Template, which you can call on the template passed to the callback. cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.