Buttons from the previous page, on the new menu page. #3131
Replies: 3 comments
-
You need to define buttons for each page or menu. The sketch must check which buttons to respond to depending on the page or menu currently on the screen. There are no functions in the library to do this and it must be managed by the sketch. |
Beta Was this translation helpful? Give feedback.
-
Can you give an example of how to do this? I've just started my adventure with ESP and I can't do everything right away. |
Beta Was this translation helpful? Give feedback.
-
For each screen, change a "mode" variable. Use if statements to read touch screen presses in each mode. Separate your thinking of TFT graphics and touch screen XY....They are independent |
Beta Was this translation helpful? Give feedback.
-
Hello Bodmer.
I have a problem with the TFT_eSPI library, more specifically with the menu display. Based on the example from the library, I wanted to create a menu. Everything went very well thanks to your library, for which I thank you very much, but I have a problem with reading the touch buttons on individual pages. More precisely, the point is that after switching to the next page in the menu, all buttons from previous pages can still be pressed as if in the background. They are not visible, but they can be pressed, which unfortunately causes a big problem because the menu buttons are in the same places. I hope you can help me, thank you in advance.
My touch display is 2.8" TFT ST7789.
Sorry for any language errors. I have to use a translator because English is not my language. Below is a fragment of the code.
Beta Was this translation helpful? Give feedback.
All reactions