128x128 Display Menu Template

Here is a menu template I made for a simple menu system, four pages plus a title screen. Navigation and selections use 3 buttons, 8 pins total.

On an Uno, the following room is available:

Sketch uses 13104 bytes (40%) of program storage space. Maximum is 32256 bytes.
Global variables use 338 bytes (16%) of dynamic memory, leaving 1710 bytes for local variables.
Maximum is 2048 bytes.

D2, D3, and D4 use Arduinos internal pull-up resistors for the buttons. The display is SPI

/* 128x128-Menu-Template.ino - Impliment a UTFT 128x128 SPI display menu template

This code is for the 1.44" TFT LCD Module using Adafruit's current libraries pulled fresh from github,
ignore the products linked video since the links included in the video, from the amazon seller, have
some older code that causes errors on this screen.

 * 1.44" TFT LCD  https://www.amazon.com/gp/product/B07B4BDWCL
 * Adafruit GFX library https://github.com/adafruit/Adafruit-GFX-Library
 * Adafruit HW Specific Library https://github.com/adafruit/Adafruit-ST7735-Library

  Pinout Display:
  These budget displays have what seem to be a misprinted silkscreen text that, at first sight, one
  will think these are I2C.  They are not!  They are in fact SPI.  Wire them as follows:

  Display | Arduino
    * 5V  to +5V
    * GND to GND
    * GND to GND
    * NC
    * NC
    * LED to 5V
    * SCL to Digital 13
    * SDA to Digital 11
    * RS  to Digital  7
    * RST to Digital  6
    * CS  to Digital  5

  Pinout Buttons (Active Low With Internal PU Resistors enabled, see setup().)
    * Left   to pin 4
    * Right  to pin 3
    * Select to pin 2 ( not yet implimented )
*/

I've tried to make the code somewhat portable in that you should just be able to modify some display properties and use it with different size screens.

Zip of files, and images is attached!

128x128-Menu-Template.zip (1.53 MB)