One variable transformed to multiple ones

pretty sure you'll need code to recognize a button press, not simply button state


when i did a multi-level menu, i used an array to keep track of which menu item the code was at at each level.

each menu level was defined by a table. each element had parameters for that menu item.

in general, there needs to be a way to advance to the next menu item at a level, return to the previous menus and select the menu item. various types of menus are possible from simple binary to entering text. this can be done with 4 buttons.

it's not a question of arrays and/or structures, but how to use them to manage the menu processing.

my menu code is 488 lines (a lot for editing text), but the file describing the menus for my application (train throttle) is only 80, but expected to grow.

the menu includes the tedious ability to enter/edit WiFi SSIDs and passwords. it is presumably complete and only the data describing new menus would need to be added.