1
0
Fork 0

adjust sortorder, make default clock always stay white even if colour got changed, add nceu widget

master
Gordon Williams 2019-11-09 20:31:03 +00:00
parent 9a3ecb6e78
commit 47b7ef53dd
8 changed files with 65 additions and 27 deletions

View File

@ -7,7 +7,7 @@
"storage": [ "storage": [
{"name":".bootcde","url":"bootloader.js"} {"name":".bootcde","url":"bootloader.js"}
], ],
"sortorder" : -1 "sortorder" : -10
}, },
{ "id": "mclock", { "id": "mclock",
"name": "Morphing Clock", "name": "Morphing Clock",
@ -20,7 +20,7 @@
{"name":"-mclock","url":"clock-morphing.js"}, {"name":"-mclock","url":"clock-morphing.js"},
{"name":"*mclock","url":"clock-morphing-icon.js","evaluate":true} {"name":"*mclock","url":"clock-morphing-icon.js","evaluate":true}
], ],
"sortorder" : -1 "sortorder" : -9
}, },
{ "id": "wclock", { "id": "wclock",
"name": "Word Clock", "name": "Word Clock",
@ -219,23 +219,6 @@
{"name":"*mouse","url":"animals-mouse.js","evaluate":true} {"name":"*mouse","url":"animals-mouse.js","evaluate":true}
] ]
}, },
{
"id": "start",
"name": "NCEU Startup",
"icon": "start.png",
"description": "NodeConfEU 2019 Startup Sequence",
"tags": "start",
"storage": [
{"name":"+start","url":"start.json"},
{"name":"-start","url":"start.js"},
{"name":"*start","url":"start-icon.js","evaluate":true},
{"name":"*bangle","url":"start-bangle.js","evaluate":true},
{"name":"*nceu","url":"start-nceu.js","evaluate":true},
{"name":"*nfr","url":"start-nfr.js","evaluate":true},
{"name":"*nodew","url":"start-nodew.js","evaluate":true},
{"name":"*tf","url":"start-tf.js","evaluate":true}
]
},
{ "id": "qrcode", { "id": "qrcode",
"name": "Custom QR Code", "name": "Custom QR Code",
"icon": "qrcode.png", "icon": "qrcode.png",
@ -272,6 +255,25 @@
{"name":"=route"} {"name":"=route"}
] ]
}, },
{
"id": "start",
"name": "NCEU Startup",
"icon": "start.png",
"description": "NodeConfEU 2019 Startup Sequence",
"tags": "start",
"storage": [
{"name":"+start","url":"start.json"},
{"name":"-start","url":"start.js"},
{"name":"*start","url":"start-icon.js","evaluate":true},
{"name":"*bangle","url":"start-bangle.js","evaluate":true},
{"name":"*nceu","url":"start-nceu.js","evaluate":true},
{"name":"*nfr","url":"start-nfr.js","evaluate":true},
{"name":"*nodew","url":"start-nodew.js","evaluate":true},
{"name":"*tf","url":"start-tf.js","evaluate":true}
],
"sortorder" : -1
},
{ "id": "funrun5", { "id": "funrun5",
"name": "5K Fun Run", "name": "5K Fun Run",
"icon": "nceu-funrun.png", "icon": "nceu-funrun.png",
@ -281,6 +283,19 @@
{"name":"+funrun5","url":"nceu-funrun.json"}, {"name":"+funrun5","url":"nceu-funrun.json"},
{"name":"-funrun5","url":"nceu-funrun.js"}, {"name":"-funrun5","url":"nceu-funrun.js"},
{"name":"*funrun5","url":"nceu-funrun-icon.js","evaluate":true} {"name":"*funrun5","url":"nceu-funrun-icon.js","evaluate":true}
] ],
"sortorder" : -1
},
{ "id": "sbat",
"name": "Battery Level Widget",
"icon": "nceu-widget.png",
"description": "Show the NodeConf EU logo in the top left",
"tags": "widget",
"type":"widget",
"storage": [
{"name":"+sbat","url":"nceu-widget.json"},
{"name":"=sbat","url":"nceu-widget.js"}
],
"sortorder" : -1
} }
] ]

View File

@ -2,7 +2,9 @@
(function(){ // make our own scope so this is GC'd when intervals are cleared (function(){ // make our own scope so this is GC'd when intervals are cleared
// Offscreen buffer // Offscreen buffer
var buf = Graphics.createArrayBuffer(240,86,1,{msb:true}); var buf = Graphics.createArrayBuffer(240,86,1,{msb:true});
function flip() { g.drawImage({width:buf.getWidth(),height:buf.getHeight(),buffer:buf.buffer},0,50); function flip() {
g.setColor(1,1,1);
g.drawImage({width:buf.getWidth(),height:buf.getHeight(),buffer:buf.buffer},0,50);
} }
// The last time that we displayed // The last time that we displayed
var lastTime = " "; var lastTime = " ";

View File

@ -1,5 +1,6 @@
{ {
"name":"Morphing Clock","type":"clock", "name":"Morphing Clock","type":"clock",
"icon":"*mclock", "icon":"*mclock",
"src":"-mclock" "src":"-mclock",
"sortorder":-10
} }

View File

@ -1,5 +1,6 @@
{ {
"name":"Word Clock","type":"clock", "name":"Word Clock","type":"clock",
"icon":"*wclock", "icon":"*wclock",
"src":"-wclock" "src":"-wclock",
"sortorder":-10
} }

View File

@ -1,5 +1,6 @@
{ {
"name":"5K Fun Run","type":"app", "name":"5K Fun Run","type":"app",
"icon":"*funrun5", "icon":"*funrun5",
"src":"-funrun5" "src":"-funrun5",
"sortorder":-1
} }

13
apps/nceu-widget.js Normal file
View File

@ -0,0 +1,13 @@
(function(){
var img = E.toArrayBuffer(atob("SxgCAAAAAAAAAAAAAAAAAAAAAAAAALwDwH/gD/0B//Af+AAD4C8f/wL8Dwf/8H//C//C//AAD9C8f/wL9Dw//+H//i4AD0AH8D/C8fAAL/Dz///H//y8ALgAf/D/i8fAALrzz///H//2//PAAv/Dz28f/gLz7z///H//29VPQAv/Dx+8fqQLw/y///H//y4ALwAP/Dwv8fAALwfw//9H//i+qD8FC0DwP8fAALwPwP/4H/+C//A//AADwD8fAAAAAAC/QD+gAAAAL4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGqooBkD+AP0fgvgAAAAAAAAAAL/88C4NBw0NBjQcAAAAAAAAAALQA8C4AAyQDBjAJAAAAAAAAAALQA8C4AAzACBjAKAAAAAAAAAAL/88C4ABTACRjQbAAAAAAAAAAL/48C4AHDACRgvjAAAAAAAAAALQA8C4AcDACBgACAAAAAAAAAALQA+D0BwCQDBgANAAAAAAAAAAL/8P/wHAA0NBgAoAAAAAAAAAAGqoC+AP/0HgAQuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
var xpos = WIDGETPOS.tl;
WIDGETPOS.tl+=75;
WIDGETS["nceu"]={draw:()=>{
var x = xpos, y = 0;
g.setColor(0.17,0.2,0.5);
g.drawImage(img,x,y);
g.setColor(1,1,1);
}};
})()

5
apps/nceu-widget.json Normal file
View File

@ -0,0 +1,5 @@
{
"name":"nceuwid",
"type":"widget",
"src":"=nceuwid"
}

BIN
apps/nceu-widget.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB