diff --git a/libs/js/banglejs/E_showMenu_Q3.min.js b/libs/js/banglejs/E_showMenu_Q3.min.js index aade8f6e0..5c4552d59 100644 --- a/libs/js/banglejs/E_showMenu_Q3.min.js +++ b/libs/js/banglejs/E_showMenu_Q3.min.js @@ -1,8 +1,8 @@ -(function(p){function y(a,b){var l=a.step||1;if(!a.noList&&void 0!==a.min&&void 0!==a.max&&20>(a.max-a.min)/l)E.showScroller({h:40,c:(a.max+l-a.min)/l,back:t,remove:n.remove,scrollMin:-24,scroll:-24,draw:(h,d)=>{if(0>h)return g.setFont("12x20").setFontAlign(-1,0).drawString("\x00\f\f\x81\x00\xff\xff\xff\x00\x00\x00\x00\x0f\xff\xff\xf0\x00\x00\x00\x00\xff\xff\xff "+b,d.x+12,d.y+40-12);g.setColor(g.theme.bg2).fillRect({x:d.x+4,y:d.y+2,w:d.w-8,h:d.h-4,r:5}); -h=h*l+a.min;g.setColor(g.theme.fg2).setFont("12x20").setFontAlign(-1,0).drawString(a.format?a.format(h,1):h,d.x+12,d.y+20);g.drawImage(atob(h==a.value?"FBSBAAH4AH/gHgeDgBww8MY/xmf+bH/jz/88//PP/zz/88f+Nn/mY/xjDww4AcHgeAf+AB+A":"FBSBAAH4AH/gHgeDgBwwAMYABmAAbAADwAA8AAPAADwAA8AANgAGYABjAAw4AcHgeAf+AB+A"),d.x+d.w-32,d.y+20-10)},select:function(h){if(!(0>h)){Bangle.buzz(20);a.value=a.min+h*l;if(a.onchange)a.onchange(a.value);u.scroll=q.scroller.scroll;t()}}});else{var c=Bangle.appRect,e=a.value;g.reset().clearRect(c); -g.setFont("12x20").setFontAlign(0,0).drawString("\x00\f\f\x81\x00\xff\xff\xff\x00\x00\x00\x00\x0f\xff\xff\xf0\x00\x00\x00\x00\xff\xff\xff "+b,c.x+c.w/2,c.y+12);function h(){var f=c.x+c.w/2,m=12+c.y+c.h/2,w=a.format?a.format(e,2):e;g.reset().setColor(g.theme.bg2).fillRect({x:c.x+24,y:c.y+36,w:c.w-48,h:c.h-48,r:5});g.setColor(g.theme.fg2).setFontVector(Math.min(30,100*(c.w-52)/g.setFontVector(100).stringWidth(w))).setFontAlign(0,0).drawString(w,f,m);g.fillPoly([f,m-45,f+15,m-30, -f-15,m-30]).fillPoly([f,m+45,f+15,m+30,f-15,m+30])}function d(f){if(f)e-=(f||1)*(a.step||1),void 0!==a.min&&ea.max&&(e=a.wrap?a.min:a.max),h();else{a.value=e;if(a.onchange)a.onchange(a.value);u.scroll=q.scroller.scroll;t()}}h();var k=0;Bangle.setUI({mode:"custom",back:t,remove:n.remove,redraw:h,drag:f=>{k+=f.dy;for(f.b||(k=0);32{Bangle.buzz(20);82>m.y?d(-1):142(a.max-a.min)/c)E.showScroller({h:40,c:(a.max+c-a.min)/c,back:t,remove:n.remove,scrollMin:-24,scroll:-24,draw:(k,e)=>{if(0>k)return g.setFont("12x20").setFontAlign(-1,0).drawString("\x00\f\f\x81\x00\xff\xff\xff\x00\x00\x00\x00\x0f\xff\xff\xf0\x00\x00\x00\x00\xff\xff\xff "+b,e.x+12,e.y+40-12);g.setColor(g.theme.bg2).fillRect({x:e.x+4,y:e.y+2,w:e.w-8,h:e.h-4,r:5}); +k=k*c+a.min;g.setColor(g.theme.fg2).setFont("12x20").setFontAlign(-1,0).drawString(a.format?a.format(k,1):k,e.x+12,e.y+20);g.drawImage(atob(k==a.value?"FBSBAAH4AH/gHgeDgBww8MY/xmf+bH/jz/88//PP/zz/88f+Nn/mY/xjDww4AcHgeAf+AB+A":"FBSBAAH4AH/gHgeDgBwwAMYABmAAbAADwAA8AAPAADwAA8AANgAGYABjAAw4AcHgeAf+AB+A"),e.x+e.w-32,e.y+20-10)},select:function(k){if(!(0>k)){Bangle.buzz(20);a.value=a.min+k*c;if(a.onchange)a.onchange(a.value);u.scroll=q.scroller.scroll;t()}}});else{var d=Bangle.appRect,f=a.value;g.reset().clearRect(d); +g.setFont("12x20").setFontAlign(0,0).drawString("\x00\f\f\x81\x00\xff\xff\xff\x00\x00\x00\x00\x0f\xff\xff\xf0\x00\x00\x00\x00\xff\xff\xff "+b,d.x+d.w/2,d.y+12);function k(){var h=d.x+d.w/2,m=12+d.y+d.h/2,w=a.format?a.format(f,2):f;g.reset().setColor(g.theme.bg2).fillRect({x:d.x+24,y:d.y+36,w:d.w-48,h:d.h-48,r:5});g.setColor(g.theme.fg2).setFontVector(Math.min(30,100*(d.w-52)/g.setFontVector(100).stringWidth(w))).setFontAlign(0,0).drawString(w,h,m);g.fillPoly([h,m-45,h+15,m-30, +h-15,m-30]).fillPoly([h,m+45,h+15,m+30,h-15,m+30])}function e(h){if(h)f-=(h||1)*(a.step||1),void 0!==a.min&&fa.max&&(f=a.wrap?a.min:a.max),k();else{a.value=f;if(a.onchange)a.onchange(a.value);u.scroll=q.scroller.scroll;t()}}k();var l=0;Bangle.setUI({mode:"custom",back:t,remove:n.remove,redraw:k,drag:h=>{l+=h.dy;for(h.b||(l=0);32{Bangle.buzz(20);82>m.y?e(-1):142""!==a&&"< Back"!=a);r.forEach(a=>{a=p[a];"object"!=typeof a||"boolean"!=typeof a.value||a.format||(a.format=b=>"\x00"+atob(b?"EhKBAH//v/////////////5//x//j//H+eP+Mf/A//h//z//////////3//g":"EhKBAH//v//8AA8AA8AA8AA8AA8AA8AA8AA8AA8AA8AA8AA8AA8AA///3//g"))});var q={draw:()=>q.scroller.draw(),scroller:void 0}; -let x;var u={h:40,c:r.length,scrollMin:-24,scroll:null!=(x=n.scroll)?x:-24,back:v,remove:n.remove,draw:(a,b)=>{if(0>a)return g.setColor(g.theme.fg).setFont("12x20").setFontAlign(-1,0).drawString("\x00\f\f\x81\x00\xff\xff\xff\x00\x00\x00\x00\x0f\xff\xff\xf0\x00\x00\x00\x00\xff\xff\xff "+n.title,b.x+12,b.y+40-12);g.setColor(g.theme.bg2).fillRect({x:b.x+4,y:b.y+2,w:b.w-8,h:b.h-4,r:5});g.setColor(g.theme.fg2).setFont("12x20");var l=24,c=p[r[a]];if("object"==typeof c){var e=c.value; -c.format&&(e=c.format(e));g.stringMetrics(e).width>b.w/2&&(e=g.wrapString(e,b.w/2).join("\n"));g.setFontAlign(1,0).drawString(e,b.x+b.w-8,b.y+20);l+=g.stringWidth(e)}else"function"==typeof c&&(g.drawImage(atob("CRKBAGA4Hg8DwPB4HgcDg8PB4eHg8HAwAA=="),b.x+b.w-21,b.y+20-9),l+=16);var k;a=null!=(k=c&&c.title)?k:r[a];k=g.wrapString(a,b.w-l);1a)return v&&v();var b=p[r[a]]; -Bangle.buzz(20);if("function"==typeof b)b();else if("object"==typeof b)if("number"==typeof b.value)y(b,r[a]);else{"boolean"==typeof b.value&&(b.value=!b.value);if(b.onchange)b.onchange(b.value);q.scroller.isActive()&&q.scroller.drawItem(a)}}};t();return q}) \ No newline at end of file +let x;var u={h:40,c:r.length,scrollMin:-24,scroll:null!=(x=n.scroll)?x:-24,back:v,remove:n.remove,draw:(a,b)=>{if(0>a)return g.setColor(g.theme.fg).setFont("12x20").setFontAlign(-1,0).drawString("\x00\f\f\x81\x00\xff\xff\xff\x00\x00\x00\x00\x0f\xff\xff\xf0\x00\x00\x00\x00\xff\xff\xff "+n.title,b.x+12,b.y+40-12);g.setColor(g.theme.bg2).fillRect({x:b.x+4,y:b.y+2,w:b.w-8,h:b.h-4,r:5});g.setColor(g.theme.fg2).setFont("12x20");var c=24,d=p[r[a]];if("object"==typeof d){var f=d.value; +d.format&&(f=d.format(f));g.stringMetrics(f).width>b.w/2&&(f=g.wrapString(f,b.w/2).join("\n"));g.setFontAlign(1,0).drawString(f,b.x+b.w-8,b.y+20);c+=g.stringWidth(f)}else"function"==typeof d&&(g.drawImage(atob("CRKBAGA4Hg8DwPB4HgcDg8PB4eHg8HAwAA=="),b.x+b.w-21,b.y+20-9),c+=16);var l;a=null!=(l=d&&d.title)?l:r[a];l=g.wrapString(a,b.w-c);1a)return v&&v();var c= +p[r[a]];Bangle.buzz(20);if("function"==typeof c)c(b);else if("object"==typeof c)if("number"==typeof c.value)y(c,r[a]);else{"boolean"==typeof c.value&&(c.value=!c.value);if(c.onchange)c.onchange(c.value,b);q.scroller.isActive()&&q.scroller.drawItem(a)}}};t();return q}) \ No newline at end of file diff --git a/libs/js/banglejs/E_showScroller_Q3.min.js b/libs/js/banglejs/E_showScroller_Q3.min.js index 5e861f1e7..c80a7a9c0 100644 --- a/libs/js/banglejs/E_showScroller_Q3.min.js +++ b/libs/js/banglejs/E_showScroller_Q3.min.js @@ -1,3 +1,3 @@ (function(d){function k(a){return a*d.h+b.y-f}function l(a){return Math.floor((a+f-b.y)/d.h)}if(!d)return Bangle.setUI();var n=()=>{g.reset().clearRect(b).setClipRect(b.x,b.y,b.x2,b.y2);for(var a=l(b.y),c=Math.min(l(b.y2),d.c-1);a<=c;a++)d.draw(a,{x:b.x,y:k(a),w:b.w,h:d.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)};Bangle.setUI({mode:"custom",back:d.back,remove:d.remove,redraw:n,drag:a=>{var c=a.dy;e.scroll-c>m&&(c=e.scroll-m);e.scroll-ca)for(a=Math.max(b.y2-(1-a),b.y),g.setClipRect(b.x,a,b.x2,b.y2),c=l(a),a=k(c);ab.y-d.h;)d.draw(c,{x:b.x,y:a,w:b.w,h:d.h}),a-=d.h,c--;g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)}},touch:(a,c)=>{if(!(c.yh||0<=a)&&a{var c=k(a);g.reset().setClipRect(b.x,Math.max(c,b.y),b.x2,Math.min(c+d.h,b.y2));d.draw(a,{x:b.x,y:c,w:b.w,h:d.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},isActive:()=>Bangle.uiRedraw==n},f=e.scroll&-2;e.draw();g.flip();return e}) \ No newline at end of file +1);(0>h||0<=a)&&a{var c=k(a);g.reset().setClipRect(b.x,Math.max(c,b.y),b.x2,Math.min(c+d.h,b.y2));d.draw(a,{x:b.x,y:c,w:b.w,h:d.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},isActive:()=>Bangle.uiRedraw==n},f=e.scroll&-2;e.draw();g.flip();return e}) \ No newline at end of file