This is what I am working on. I owe much thanks to those who have pushed me in the right direction with helpful pointers and coding examples. Still having to bit-bang the SPI to the Playstation2 controller. :(
http://www.youtube.com/watch?v=7KYny2ACkmM
I have learned more C++ in the last week than I thought possible. The code is in a state of constant flux as I learn new and better ways to do things. I've practically re-written the whole thing twice now, but that may be a good thing.
The menu system was a particularly devilish problem; I could not find decent examples online showing how to generate text menus with C++. I did not want to create a separate menu function for each menu, so I took a rather interesting approach to solving the problem. I'll document it here in case anyone knows of a faster/better/safer way of doing this. Anyone not interested in the gory details can just stop reading here. :)
The main menu has 4 choices. The largest number of choices in the first level of sub-menus is 15. The largest number of choices in the second level of sub-menus is 14. There is no third level of sub-menus. Taking this into consideration, I created two 5x18x18 matrices. One matrix contains all of the menu item descriptions while the second one is populated with pointers to the corresponding function. Upon entering the main menu and in cases where a menu choice will descend into a deeper sub-menu, the same showMenu function is called.
A 3-dimensional cursor is updated with the first level of menus moving in the X direction, then Y, then finally Z. The first element [0] in each direction is the name of the menu, for example, [0][0][0] is "MAIN" in one matrix and showMenu in the other. The cursor is automatically incremented by one in the correct direction, leading to [1][0][0] in the first case which holds "Objects" and showMenu in the two matrices. The user scrolls through the menu items and the 3D cursor will go between 1 and 4. In the event that the user selects the 4th choice, the cursor will be at [4][0][0]. At this position in one matrix is the description "Setup" and the second matrix holds a pointer to showMenu(). Selecting this choice moves the cursor to [4][1][0] which holds "Align" and, alignScope() in the other matrix.
The menu display is updated with the contents of [4][0][0] which was "Setup" to indicate to the user which menu/submenu they are in. If the user scrolls down one, they will be at [4][2][0] which holds "Date" in one matrix and a pointer to showMenu in the other. This choice will push the cursor in the Z direction once to [4][2][1] which holds "Set Manually" in the description matrix and a pointer to setTimeManual() in the other. Selecting this item will run the setTimeManual() function since it is not another menu instance. When the function returns, you are put back in the previous showMenu function, and you continuously exit the menus until you get back to the main screen.
The 3D matrix bit work works, and it does not appear to take up much room. My entire sketch is currently 22KB in size, and will probably grow and shrink as I add features and find more efficient ways of doing things.