1) How would I know if someone pressed either Ok, or Apply in the Preferences screen so I can save data?
2) How would I put the user in globally away state?
Thanks,
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-10-13
you get a callback into plugin_main and sent an event
1) How would I know if someone pressed either Ok, or Apply in the Preferences screen so I can save data?
2) How would I put the user in globally away state?
Thanks,
David
you get a callback into plugin_main and sent an event
if (!_stricmp(event, "prefsAction"))
{
struct plugin_prefs_action_t *ppa = (struct plugin_prefs_action_t *)data;
/* Take action:
*
* 0 - Cancel
* 1 - Apply
* 2 - OK
*/
Should have had that a bit clearer. You need to check the action type e.g.
if (1 == ppa->type)
{
writeConfig();
}