Espruino/libs/js/banglejs/E_showMenu.min.js
Gordon Williams a96bf2c659 Added E.showPrompt, E.showAlert for Bangle.js
Also start responding to button pressed on IRQ rather than polling
2019-10-31 15:34:54 +00:00

2 lines
763 B
JavaScript

(function(a){function d(a){return{width:8,height:a.length,bpp:1,buffer:(new Uint8Array(a)).buffer}}Bangle.btnWatches&&(Bangle.btnWatches.forEach(clearWatch),Bangle.btnWatches=void 0);g.clear(1);g.flip();if(a){a[""]||(a[""]={});g.setFont("6x8",2);g.setFontAlign(-1,-1,0);var b=g.getWidth()-9;g.getHeight();a[""].fontHeight=16;a[""].x=0;a[""].x2=b-2;a[""].y=40;a[""].y2=200;a[""].preflip=function(){g.drawImage(d([16,56,124,254,16,16,16,16]),b,40);g.drawImage(d([16,16,16,16,254,124,56,16]),
b,194);g.drawImage(d([0,8,12,14,255,14,12,8]),b,116)};var c=require("graphical_menu").list(g,a);Bangle.btnWatches=[setWatch(function(){c.move(-1)},BTN1,{repeat:1}),setWatch(function(){c.move(1)},BTN3,{repeat:1}),setWatch(function(){c.select()},BTN2,{repeat:1})];return c}})