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):
Thanks, will try that!
I don't really understand what you're asking here...
Here is an example, i basically want to go from the main menu to the adjustment page without the intermediate menu. Is there a way to do that?
var Layout = require("Layout");
var a=50;
var adjustA = {
'< BACK>': initMainMenu,
'A': {
value: a, min:0, max:100, step:1,
format: function(value) {
return (value);
},
onchange: function(value) {
a=value;
}
}
};
function initMainMenu() {
var mainMenu = new Layout (
{type:"btn", font:"15%", fillx:1, filly:1, label:"adjust A", cb:l=>E.showMenu(adjustA)}
);
g.clear();
mainMenu.render();
}
initMainMenu();
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.
Thanks, will try that!
Here is an example, i basically want to go from the main menu to the adjustment page without the intermediate menu. Is there a way to do that?
3 Attachments