diff --git a/libs/js/banglejs/E_showMenu_F5.js b/libs/js/banglejs/E_showMenu_F5.js index 1a9a5f22b5..7cc919122a 100644 --- a/libs/js/banglejs/E_showMenu_F5.js +++ b/libs/js/banglejs/E_showMenu_F5.js @@ -106,7 +106,7 @@ }, select : function() { var item = items[menuItems[options.selected]]; - if ("function" == typeof item) item(l); + if ("function" == typeof item) item(); else if ("object" == typeof item) { // if a number, go into 'edit mode' if ("number" == typeof item.value) diff --git a/libs/js/dickens/E_showMenu_DICKENS.js b/libs/js/dickens/E_showMenu_DICKENS.js index 40afabb1ce..a51cd26d7e 100644 --- a/libs/js/dickens/E_showMenu_DICKENS.js +++ b/libs/js/dickens/E_showMenu_DICKENS.js @@ -76,7 +76,7 @@ var item = items[menuItems[options.selected]]; if ("function" == typeof item) { Bangle.setUI(); // clear Bangle.btnWatches - item(l); + item(); } else if ("object" == typeof item) { // if a number, go into 'edit mode' diff --git a/libs/js/dickens/E_showMenu_DICKENS.min.js b/libs/js/dickens/E_showMenu_DICKENS.min.js index 150fe2ced2..385e97e8e4 100644 --- a/libs/js/dickens/E_showMenu_DICKENS.min.js +++ b/libs/js/dickens/E_showMenu_DICKENS.min.js @@ -1,5 +1,5 @@ -(function(m,n){global.Dickens||(Dickens={});Bangle.setUI();g.clear(1);if(m){g.setColor("#305080");g.fillArc(.285*-Math.PI,.285*Math.PI,96);g.fillArc(Math.PI*(1-.285),1.285*Math.PI,96);g.fillRect(41,62,195,62);g.fillRect(41,175,195,175);var e=Object.keys(m),b=m[""];b&&e.splice(e.indexOf(""),1);b instanceof Object||(b={});b.fontHeight=16;void 0===b.selected&&(b.selected=0);var p=require("locale"),d={draw:function(){g.reset().setColor(-1).setFontGrotesk16();b.title&&(g.setFontAlign(0, --1,0),g.setBgColor("#305080").drawString(b.title,119,42));g.setBgColor(0);var c=0|Math.min(103/b.fontHeight,e.length),a=E.clip(b.selected-(c>>1),0,e.length-c),h=71;for(g.setColor(0Math.abs(a.value)&&(a.value=0);void 0!==a.min&&a.valuea.max&&(a.value=a.wrap?a.min:a.max);if(a.onchange)a.onchange(a.value)}else b.selected= -(c+b.selected)%e.length,0>b.selected&&(b.selected+=e.length);d.draw()}};Dickens.buttonIcons=["select",null,"down","up"];n&&(Dickens.buttonIcons[1]="back");d.draw();Dickens.loadSurround&&Dickens.loadSurround();Bangle.btnWatches=[setWatch(function(){d.move(-1)},BTN4,{repeat:1}),setWatch(function(){d.move(1)},BTN3,{repeat:1}),setWatch(function(){d.select()},BTN1,{repeat:1})];n&&Bangle.btnWatches.push(setWatch(n,BTN2,{repeat:1}));return d}}) \ No newline at end of file +(function(m,n){global.Dickens||(Dickens={});Bangle.setUI();g.clear(1);if(m){g.setColor("#305080");g.fillArc(.285*-Math.PI,.285*Math.PI,96);g.fillArc(Math.PI*(1-.285),1.285*Math.PI,96);g.fillRect(41,62,195,62);g.fillRect(41,175,195,175);var e=Object.keys(m),b=m[""];b&&e.splice(e.indexOf(""),1);b instanceof Object||(b={});b.fontHeight=16;void 0===b.selected&&(b.selected=0);var d={draw:function(){g.reset().setColor(-1).setFontGrotesk16();b.title&&(g.setFontAlign(0,-1,0),g.setBgColor("#305080").drawString(b.title, +119,42));g.setBgColor(0);var c=0|Math.min(103/b.fontHeight,e.length),a=E.clip(b.selected-(c>>1),0,e.length-c),f=71;for(g.setColor(0Math.abs(a.value)&&(a.value=0);void 0!==a.min&&a.valuea.max&&(a.value=a.wrap?a.min:a.max);if(a.onchange)a.onchange(a.value)}else b.selected=(c+b.selected)%e.length,0>b.selected&&(b.selected+=e.length);d.draw()}}; +Dickens.buttonIcons=["select",null,"down","up"];n&&(Dickens.buttonIcons[1]="back");d.draw();Dickens.loadSurround&&Dickens.loadSurround();Bangle.btnWatches=[setWatch(function(){d.move(-1)},BTN4,{repeat:1}),setWatch(function(){d.move(1)},BTN3,{repeat:1}),setWatch(function(){d.select()},BTN1,{repeat:1})];n&&Bangle.btnWatches.push(setWatch(n,BTN2,{repeat:1}));return d}}) \ No newline at end of file diff --git a/libs/js/graphical_menu.min.js b/libs/js/graphical_menu.min.js index ee2a7941b8..dc25bebf40 100644 --- a/libs/js/graphical_menu.min.js +++ b/libs/js/graphical_menu.min.js @@ -1,4 +1,4 @@ -exports.list=function(c,n){var a=n[""],f=Object.keys(n);a&&(f.splice(f.indexOf(""),1),a.back&&(n["< Back"]=a.back,f.unshift("< Back")));a instanceof Object||(a={});void 0===a.selected&&(a.selected=0);a.fontHeight||(a.fontHeight=6);var r=0|a.x,p=a.x2||c.getWidth()-1,m=0|a.y,v=a.y2||c.getHeight()-1;a.title&&(m+=a.fontHeight+2);var w=a.cB||0,q=a.cF;void 0===q&&(q=-1);var t=a.cHB;void 0===t&&(t=-1);var u=a.cHF||0,e={draw:function(){c.setColor(q);a.predraw&&a.predraw(c);c.setFontAlign(0, --1);a.title&&(c.drawString(a.title,(r+p)/2,m-a.fontHeight-2),c.drawLine(r,m-2,p,m-2));for(var d=0|Math.min((v-m)/a.fontHeight,f.length),b=E.clip(a.selected-(d>>1),0,f.length-d),g=m,x=0b.max&&(b.value=b.wrap?b.min:b.max);if(b.onchange)b.onchange(b.value)}else a.selected=(d+a.selected+f.length)%f.length;e.draw()}};e.draw();return e} \ No newline at end of file +exports.list=function(c,n){var a=n[""],e=Object.keys(n);a&&(e.splice(e.indexOf(""),1),a.back&&(n["< Back"]=a.back,e.unshift("< Back")));a instanceof Object||(a={});void 0===a.selected&&(a.selected=0);a.fontHeight||(a.fontHeight=6);var r=0|a.x,p=a.x2||c.getWidth()-1,m=0|a.y,v=a.y2||c.getHeight()-1;a.title&&(m+=a.fontHeight+2);var w=a.cB||0,q=a.cF;void 0===q&&(q=-1);var t=a.cHB;void 0===t&&(t=-1);var u=a.cHF||0,f={draw:function(){c.setColor(q);a.predraw&&a.predraw(c);c.setFontAlign(0, +-1);a.title&&(c.drawString(a.title,(r+p)/2,m-a.fontHeight-2),c.drawLine(r,m-2,p,m-2));for(var d=0|Math.min((v-m)/a.fontHeight,e.length),b=E.clip(a.selected-(d>>1),0,e.length-d),g=m,x=0b.max&&(b.value=b.wrap?b.min:b.max);if(b.onchange)b.onchange(b.value)}else a.selected=(d+a.selected+e.length)%e.length;f.draw()}};f.draw();return f} \ No newline at end of file