UTFT touchscreen SD file selection buttons with Teensy 3

So, I am hoping to use this system with my light painting kit. I want to be able to select a file from the sd card on the fly. To do this, I have made a sketch using Henning Karlsen’s UTFT library. But, I have adapted it to make on the fly buttons, so that all files on the sd card can be scrolled through, shown on the screen, and then selected at the touch of the screen.

here is a screen shot.
utft sd file touch selection

You can scroll through the files held on the sd card by touching the up or down arrows, this brings up the next set of files, and automatically creates buttons for each file, so that when you touch the filename, you are actually touching a button. you can set you own actions for what happens when you touch the button. I have created a sketch what will show the selected BMP file on a blank screen. Later I will use this to set the selected file as the image that will shown via the light painting kit.

The code for the sketch is on the PJRC forum. Thats the place for everything Teensy. FORUM

The video is: