T35 Console for Menu or Debug Messages
This code is intended to provide an easy means of displaying debug messages and listing selectable menu items. My codeshare at http://www.tinyclr.com/codeshare/entry/663 on “What to expect from interrupts?” is an important reference for this paper.
Testing of the code has been carried out on a EMX Development System. The example code (displayed in one of the images attached) has some special features. The “indent” variable if not set to zero should be included as a parameter in all T35_Console_Library.T35_Display functions. This positions the menu item number in a consistent column. The selected item index number is derived from this column.
If you wish to have several paragraphs at various indents then set the variable “indent” to zero and provide separate paragraph indents in each T35_Console_Library.T35_Display function.
For menus T35_Console_Library.menuNum always provides the number highlighted and its selection is confirmed by T35_Console_Library.menuIsSet being equal to true.
Rather than having scrolling (which would not be satisfactory for menus) I have provided a Screen.Clear(): if the row count has reached the last row and the user presses the Select button, the screen will clear. If the Bitmap Screen variable is made public, the screen could be cleared at any point in your code.
Reference: LCD PT0353224T-A802.pdf