MUI - one button - two different jumps (destination pages)? #2351
-
Hello, Oliver! i know it's too many questions, but maybe your tech will bring much more with this info for others. So, my question is - do you think it's possible to have one button on a form with different assigned form depending on a condition? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Sure, why not. The key-event mapping is anyways made by the mui use, so it would be easy to add any condition. (created issue: #2356) |
Beta Was this translation helpful? Give feedback.
I have created and tested a MUI menu with only one button and Bounce2 lib: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/MUIInput1BtnBounce2/MUIInput1BtnBounce2.ino
There was a little change required: Instead of Bounce2.pressed() function we must use the Bounce2.released() function.
But all in all it works nicely with only one button:
u8g2/sys/arduino/u8g2_page_buffer/MUIInput1BtnBounce2/MUIInput1BtnBounce2.ino
Lines 513 to 522 in 8430f65