mirror of https://github.com/espruino/BangleApps
move animals down as it's not very exciting and takes ages to load
parent
eb59410048
commit
e7fbbd36ff
|
@ -218,7 +218,8 @@
|
|||
{"name":"*pig","url":"animals-pig.js","evaluate":true},
|
||||
{"name":"*sheep","url":"animals-sheep.js","evaluate":true},
|
||||
{"name":"*mouse","url":"animals-mouse.js","evaluate":true}
|
||||
]
|
||||
],
|
||||
"sortorder" : 1
|
||||
},
|
||||
{ "id": "qrcode",
|
||||
"name": "Custom QR Code",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
function drawApp(){function b(a){return{width:8,height:a.length,bpp:1,buffer:new Uint8Array(a).buffer};}g.clear(),g.setFont('6x8',2),g.setFontAlign(0,0),g.drawString(profile,120,120);const a=g.getWidth()-18;g.drawImage(b([16,56,124,254,16,16,16,16]),a,40),g.drawImage(b([16,16,16,16,254,124,56,16]),a,194),g.drawImage(b([0,8,12,14,255,14,12,8]),a,116);}var storage=require('Storage');const settings=storage.readJSON('@setting')||{HID:!1};var sendHid,next,prev,toggle,up,down,profile;settings.HID?(profile='Keyboard',sendHid=function(b,a){try{NRF.sendHIDReport([2,0,0,b,0,0,0,0,0],()=>NRF.sendHIDReport([2,0,0,0,0,0,0,0,0],()=>a&&a();););}catch(a){print(a);}},next=function(a){sendHid(79,a);},prev=function(a){sendHid(80,a);},toggle=function(a){sendHid(44,a);},up=function(a){sendHid(82,a);},down=function(a){sendHid(81,a);}):(E.showMessage('HID disabled'),setTimeout(load,1000)),next&&(settings.HIDGestures&&Bangle.on('aiGesture',v=>switch(v){case'swipeleft':E.showMessage('next');setTimeout(drawApp,1000);next(()=>;);break;case'swiperight':E.showMessage('prev');setTimeout(drawApp,1000);prev(()=>;);break;}),setWatch(function(b){var a=b.time-b.lastTime;a>0.3&&a<0.9?(E.showMessage('prev'),setTimeout(drawApp,1000),prev(()=>;)):(E.showMessage('up'),setTimeout(drawApp,1000),up(()=>;));},BTN1,{edge:'falling',repeat:!0,debounce:50}),setWatch(function(b){var a=b.time-b.lastTime;a>0.3&&a<0.9?(E.showMessage('next'),setTimeout(drawApp,1000),next(()=>;)):(E.showMessage('down'),setTimeout(drawApp,1000),down(()=>;));},BTN3,{edge:'falling',repeat:!0,debounce:50}),setWatch(function(a){E.showMessage('toggle'),setTimeout(drawApp,1000),toggle();},BTN2,{edge:'falling',repeat:!0,debounce:50}),drawApp());
|
Loading…
Reference in New Issue