EDIT:
I have learnt that the "level skipping" feature I theorised near the bottom of this post is indeed the intended functionality, and that changing the value of the parameter tells SubMenus with a different value to close themselves.
It's considered as something like the following:
  • "set this parameter to X when the user opens this SubMenu"
  • "if this parameter is NOT set to X, close this SubMenu"
  • "reset this parameter to 0 when the user presses Back in this SubMenu (i.e. excluding in nested SubMenus of this SubMenu)"
Rather than what I understood from the docs:
  • "set this parameter to X when the user opens this SubMenu"
  • "reset this parameter to 0 when the user presses Back in this SubMenu"
I've created a pull request to update the docs to clarify this behaviour:
--- old post:
Create an avatar with nested SubMenus all setting the same parameter.
i.e.:
Root Menu
> A (SubMenu, param = 1)
>> B (SubMenu, param = 1)
>>> C (SubMenu, param = 1)
>>>> etc
>>> D (SubMenu, param = 2)
>>>> etc
Pressing Back on SubMenu B and C returns to Root Menu instead of A and B respectively.
Setting the parameter to a different value (like SubMenu D) causes the button to lead to the Root Menu instead of its own submenu.
Avatar:
For this avatar I wanted to show images on-screen based on which menus are selected, as a sort of "file browser", but once I added the parameters the menus no longer flow as expected. The
friendly_ui.sh
menus still work as expected as they don't have parameters set.
I'm almost certain this is a bug, but it's possible it could be an intended (but undocumented?) level skipping feature?
In the attached images, you can see the
/mnt/Tera/
directory SubMenu; clicking
Myself.ini
takes the user back to the Root Menu instead of the intended SubMenu.