Closed pailpoe closed 3 years ago
That's an interesting idea! I see, how it can be useful. I will look into it.
Added ability to specify an optional exitAction
callback in GEMPage
constructor in ver. 1.2.5!
GEMPage menuPageMain("Configuration", blinkMillis); // Main page with exit callback, that will be fired when pressing Cancel button
This can be any action, including those in which context is created. Action will be fired only for top-level menu page (i.e. menu page that has no parent) when not in edit mode and GEM_KEY_CANCEL
is pressed.
Gist with auto-loaded context updated accordingly and can be found here.
There is slight difference between launching an action via button and launching an action through an exit callback: when launching an action via button current menu pointer position remains unchanged (i.e. button will still be in focus when menu is redrawn to the screen next time), whereas in case of an exit callback menu pointer position will be reset (i.e. set to the first menu item).
Thankyou, i will test this modification this week.
Itβs perfect ! Happy Christmas
Glad to hear!
Merry Christmas=) π πβ
Hello Alexander, It's possible to add the possibility from the main menu when i press cancel to launch a item ( i want to launch my main context without the need to scroll up and click ok).
Thanks.