Hi all,
I have a prototype that I am working on which has a four-direction keypad and a central selection button. The pad and selection button are used to navigate through various levels of menus and options on a screen.
My problem is figuring out the best way to architect functions and code to track the location of the selection bar within menus. There are potentially a lot of options - for example, any 12 x/vertical options could be paired with any12 y/horizontal options = 122 possible things to track, *which then need a reaction once the selection button is pressed.
***my main issue : i have a selection button and other options buttons, where the data presented onPress is different depending on the location of the selection bar or cursor.
What suggestions do people have for creating code that is easy to write and update?**
I can write out 122 if () else if () statements, but there should be a more simple method?
Much thanks to anyone that can provide a a few hints for a general code framework ?