Issues with TFT LCD Touchscreen and Arduino mega

Oops. Doing this on cellphone is a pain!!

Anyway, redoing the struct...

'''
struct menuitems
{
Adafruit_GFX_Button menuitem;
bool state ;
etc. - anything else you'd like to associate with the menus selection..
} ;

'''
You can then make an array of menuitems:

'menuitems mnuButton[4] ; '

Use that in your button press dispatcher:

'''
If (mnuButton[i].menuitem.contains(pixel_x, pixel_y))
update_button(&(mnuButton[i])) ;
'''

Now the update_button() can get whatever info it needs to decide what to do