Jump to content

Multi Parm Buttons


Recommended Posts

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...