Monday, June 19, 2023

Drawing on the LCD screen to test functions I need - part 9

MODIFIED THE USER INTERFACE SCREEN

I modified my code to set up the top 480 x 240 to display 13 file names from the extracted list built by reading through the CARTS directory on the SD card. I chose black as the background color with white for most text entries. 

The currently highlighted entry, which is moved by the up and down arrow buttons, has a gray background with white text. If the select button is pushed to toggle on selection of the currently highlighted entry, then the background becomes cyan and the text is red to show that this virtual cartridge is now loaded into the disk drive for access.

By up and down arrows are bitmaps in bright green and the select button is a rectangle in the center, which is cyan to match how the selected entry appears in the list of cartridge names.  

BITMAP RESEARCH AND TESTING

My bitmap of the up arrow is displaying successfully. I realized that I wanted the background outside the arrow to be black, which is my preferred background for the user interface. The relatively small font shows well as white over a black background. 

I do have one anomaly where the down arrow is shown but appears pointing up instead - I will debug this although it was in test code and not the code that will draw the user interface.

The current size, at 130x130 pixels, is just too big for a 480x320 screen. I plan to shrink these to 80x80 before I make use of them. My first try was unfortunately done with Microsoft tools. When I selected the choice to resize and chose 80x80, it unilaterally converted to 32 bit color values - sigh. Another tool changed it back to 24 but somehow the image is completely screwed up now. I guess I need to start over creating the arrow bitmaps. 

No comments:

Post a Comment