I need some code help after thinking I was on the right path, trying to build a multi page menu on a TFT screen, using the touchscreen as my button input mechanism, based on the GFX button code in the GFX library. After several passes, I settled in on the design of using dedicated command buttons, and then a variable sized user button approach. This is my first effort with the TFT and touchscreen. I don't have a solid coding background, so it is possible my approach was wrong. My thinking was that I could resuse the "Adafruit_GFX_Button buttons;" array, similar to how I used the button color array.
if I left 17,18,19 dedicated for my command buttons. (I wanted to use 1,2,3 but could not figure out how to design the button color arrays and Name arrays.) Recently I have experienced buttons on other pages popping up after a button press on an unrelated page.
Specifically, TopMenu "Menu3" takes me to Menu3 page, selecting 1 and 2 behaves as expected, but then selecting button3, or button 4 I get the topmenu "menu3" button to pop up or something from menu4, like button 10 to popup.
I'm guessing now, but I think my question probably centers around my use of the array, "Adafruit_GFX_Button buttons;", can I use the same 20 "buttons depending on the page desiplayed, (or am I not doing it right) , or do I need "Adafruit_GFX_Button buttons;" and each button in the array has a dedicated function independent of the page.
Code experts please advise me on the errors of my ways!