This is a preliminary question as I am yet to hit the keyboard and start coding but I want to write good code using good practices.
I will be having 2 pages on a TFT. The first will have maybe 10 buttons/text and the second will have a multiple column/rowed table of data. To setup the outline of the table I could obviously hard code the coordinates into the sketch but should I ever want to make changes I would have to go through the code line by line to ensure I change all values. Is it perhaps better to use either integers or maybe arrays to store these values then reference those integers/arrays in the tft.drawline commands?
To draw a single button it might be something like;
int btnRecord[] = {10, 10, 60, 60};
myGLCD.drawRoundRect (btnRecord[0], btnRecord[1], btnRecord[2], btnRecord[3]);
This example is obviously highly simplified but it should show my thoughts. The real sketch would have dozens of buttons and/or lines etc
Is this good practice?? Would there be a high memory overhead??