Advertisement
Guest User

Untitled

a guest
Oct 29th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. static const char* formatter_setting(char *buffer, size_t buffer_size,
  2. int val, const char *unit)
  3. {
  4. (void) buffer_size;
  5. (void) unit;
  6. if (val <= 0 || EXTERNAL == true)
  7. return str(LANG_OFF);
  8. return buffer;
  9. }
  10. //you will need to send the setting to callbackFN OR handle the logic elsewhere
  11.  
  12. /*#define INT_SETTING_NOWRAP(flags, var, lang_id, default, name,
  13. unit, min, max, step, formatter, get_talk_id, cb)*/
  14.  
  15. INT_SETTING(flags,&global_settings.var , LANG_ID, default,
  16. "setting name", UNIT_INT, -1,1,1,
  17. formatter_setting, GETTALKfn[NULL],CALLBACKfn[NULL}),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement