Hello again.
This time I will give you one of my menu systems. I have made graphical menus in the past with a more project oriented approach, but I ended up spending time redoing the same functionality. This one I made it to be more reusable, I used it in two projects so far, it seems good. It is difficult to achieve a "one size fits all" solution. This one sacrifices space for ease of use and readability. There are lost bytes in the struct of the strings. Since I use rather large PICS now, is no big deal for me but it may not be the case for you. If you check it I would like some feedback, please. If you can suggest ways to improve it, I'll be happy to know them.
It is a rather simple and easy to configure way to create complex menu trees. It is written in CCS C and is based on the GLCD library I posted here a few days ago. This library supports Greek characters, so a bilingual menu can be made very easily. I am attaching here all the necessary files inside the.zip. An example 'main.c' is also included to help. Instruction on how to use it are in the comments inside.
It creates a root menu with up to 5 entries (all screens can fit up to five items) that can lead to other sub-menus. The menu items can have some code attached, to do something, or they can have a parameter to change. The menu is used with four buttons as I almost always have at least four buttons on my projects. It needs Up and Down to choose (and also increase and decrease), as the menu is vertically arranged, a Back button to exit without an action made and an Enter to select, save or execute.
It looks like image 1. When there is a parameter to change, it pops up a box like image 2. We can increase or decrease (image 3) and with Enter it saves and refreshes the screen (image 4).
I uploaded on youtube a small video to show it better:
https://youtu.be/wASAaGrfDKcAnother video showing some functionality with greek characters is here:
https://www.youtube.com/watch?v=1kgoNbN_UIUI hope someone will find it useful.
Have fun,
Theodore.