forked from FOSS/BangleApps
parent
406ac50c1d
commit
a8f0481faa
|
@ -0,0 +1,12 @@
|
||||||
|
// Create an entry in apps.json as follows:
|
||||||
|
{ "id": "7chname",
|
||||||
|
"name": "My app's human readable name",
|
||||||
|
"icon": "my-great-app.png",
|
||||||
|
"description": "A detailed description of my great app",
|
||||||
|
"tags": "",
|
||||||
|
"storage": [
|
||||||
|
{"name":"+7chname","url":"my-great-app.json"},
|
||||||
|
{"name":"-7chname","url":"my-great-app.js"},
|
||||||
|
{"name":"*7chname","url":"my-great-app-icon.js","evaluate":true}
|
||||||
|
],
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
use the Espruino image converter @ https://www.espruino.com/Image+Converter
|
||||||
|
|
||||||
|
settings x Use Compression?
|
||||||
|
x Transparency?
|
||||||
|
Defusion: flat
|
||||||
|
Colours: 1 bit, 4 bit or 8 bit Web Palette
|
||||||
|
Output as: Image String
|
||||||
|
|
||||||
|
Copy result and replace sample below
|
||||||
|
*/
|
||||||
|
require("heatshrink").decompress(atob("mEwwJC/AH4A/AH4AgA=="))
|
|
@ -0,0 +1,35 @@
|
||||||
|
/* jshint esversion: 6 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
the screen area(0,0,239,23) is reserved for wigdets
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
(() => {
|
||||||
|
|
||||||
|
// section for const and vars if needed
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
// section for functions, classes
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
function < your main function > ()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// special function to handle display switch on
|
||||||
|
Bangle.on('lcdPower', (on) => {
|
||||||
|
if (on) {
|
||||||
|
drawWidgets();
|
||||||
|
<your main function>();;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// clear screen and launch
|
||||||
|
g.clear();
|
||||||
|
<your main funtion>();
|
||||||
|
|
||||||
|
})();
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"name":"Short Name",
|
||||||
|
"icon":"*7chname",
|
||||||
|
"src":"-7chname"
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 97 B |
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
widget area is 24 pixel high and 239 width : (0,0,239,23)
|
||||||
|
*/
|
||||||
|
(() => {
|
||||||
|
|
||||||
|
// const data, var or image
|
||||||
|
|
||||||
|
function draw() {
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
WIDGETS["your widget name"] = { draw: draw };
|
||||||
|
})()
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"name":"widgetname", "type":"widget",
|
||||||
|
"src":"-7chname"
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 97 B |
Loading…
Reference in New Issue