jonblack / arduino-menusystem

Arduino library for implementing a menu system
MIT License
194 stars 85 forks source link

Add back callback #79

Open niesteszeck opened 6 years ago

niesteszeck commented 6 years ago

Is there a way to attach a callback to the menusystem.back() method?

I want to create a cancel callback for NumericMenuItems. For example I'm enabling blink on a lcd when entering a numeric menu item, so on the select callback I stop blinking (and other stuff), but when I call ms.back() from other part of the program, the select callback doesn't get called and the lcd keeps the blinking, so if there where a back callback I can turn off blinking. Also I would like to make it more like a cancel, so in there I can reset the menu and cancel the edition NumericMenuItem value