Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » Navigating to submenu rather than submenu item

Author: Solapse
11/03/2022 10:46:20
Hi,

I'm using the info here: https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menumanager-and-iteration/

specifically: navigateToMenu(theNewItem, possibleActive = nullptr, customMenu = false);

My use case is to move a potentiometer on the front panel and it show you the value change, and related other parameters - some of which are also bound to potentiometers, others which are "optional" and are controlled via the encoder. So far, so good.

When using the navigateToMenu, it takes me directly to the parameter - this works as intended of course.

Is there a way to be taken to the submenu as a whole i.e. not a menuitem but show the menu that the menuitem contains? Let's say I have MenuL1 -> MenuL2 -> Parameter[x] - I'd like to go to the menu that shows all the Parameters with the title bar, rather than the Parameter itself. The reason this is a problem is that a) if the user wanted to navigate to a parameter "before" this one in the submenu, it isn't selectable and b) there's no title so parameter names don't get context by its menu.

Thanks!

Author: Solapse
11/03/2022 11:26:27
Got it - needed to find the parent, nav to that, and use "onMenuSelect".

Author: davetcc
15/03/2022 08:45:58
Sorry for the delay in responding.

Yes, you're right there's a bit of missing documentation here. The nagivate to menu must be given the first item in the menu to be displayed. I'll update the documentation later, but I guess it should be

menuMgr.navigateToMenu(subToNavigateTo.getChild() ...)




Register / Login  |  Desktop view  |  Jump to top of page