When created, the 'Layout' object 'grabs' user input from the screen. What you'd need to do is just create a Layout object as and when you want it rather than trying to keep them in RAM all the time (it's also better for memory usage):
function showAMenu() {
var AMenu = new Layout( {
{type:"btn", label:"something", cb:l=>{}}
});
}
var mainMenu = new Layout( {
{type:"btn", label:"A", cb:l=>{showAMenu();}}
});
Also, i would like to change a value via the graphical menu, but without actually displaying the menu
I don't really understand what you're asking here... You can change the values in the object you pass to the menu and then I think E.showMenu returns and object that has a render function in it you can call to update.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
When created, the 'Layout' object 'grabs' user input from the screen. What you'd need to do is just create a Layout object as and when you want it rather than trying to keep them in RAM all the time (it's also better for memory usage):
I don't really understand what you're asking here... You can change the values in the object you pass to the menu and then I think
E.showMenu
returns and object that has a render function in it you can call to update.