diff --git a/skeleton/add_my-great-app_to_apps.json b/skeleton/add_my-great-app_to_apps.json new file mode 100644 index 000000000..dd49bca18 --- /dev/null +++ b/skeleton/add_my-great-app_to_apps.json @@ -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} + ], +} diff --git a/skeleton/my-great-app-icon.js b/skeleton/my-great-app-icon.js new file mode 100644 index 000000000..305afb697 --- /dev/null +++ b/skeleton/my-great-app-icon.js @@ -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==")) diff --git a/skeleton/my-great-app.js b/skeleton/my-great-app.js new file mode 100644 index 000000000..e42ea07e9 --- /dev/null +++ b/skeleton/my-great-app.js @@ -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(); + ();; + } + }); + + // clear screen and launch + g.clear(); + (); + +})(); diff --git a/skeleton/my-great-app.json b/skeleton/my-great-app.json new file mode 100644 index 000000000..65168c5a1 --- /dev/null +++ b/skeleton/my-great-app.json @@ -0,0 +1,5 @@ +{ + "name":"Short Name", + "icon":"*7chname", + "src":"-7chname" +} diff --git a/skeleton/my-great-app.png b/skeleton/my-great-app.png new file mode 100755 index 000000000..e0693423b Binary files /dev/null and b/skeleton/my-great-app.png differ diff --git a/skeleton/my-great-widget.js b/skeleton/my-great-widget.js new file mode 100644 index 000000000..ff1ab93cd --- /dev/null +++ b/skeleton/my-great-widget.js @@ -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 }; +})() diff --git a/skeleton/my-great-widget.json b/skeleton/my-great-widget.json new file mode 100644 index 000000000..239e18c77 --- /dev/null +++ b/skeleton/my-great-widget.json @@ -0,0 +1,4 @@ +{ + "name":"widgetname", "type":"widget", + "src":"-7chname" +} diff --git a/skeleton/my-great-widget.png b/skeleton/my-great-widget.png new file mode 100755 index 000000000..e0693423b Binary files /dev/null and b/skeleton/my-great-widget.png differ