forked from FOSS/BangleApps
commit
1323bd2bd6
11
apps.json
11
apps.json
|
@ -800,5 +800,16 @@
|
|||
{"name":"torch.wid.js","url":"widget.js"},
|
||||
{"name":"torch.img","url":"app-icon.js","evaluate":true}
|
||||
]
|
||||
},
|
||||
{ "id": "widid",
|
||||
"name": "My NRF ID Widget",
|
||||
"icon": "widid.png",
|
||||
"version":"0.01",
|
||||
"description": "Display the last two tuple of your Bangle.js address in the widget section.",
|
||||
"tags": "widget",
|
||||
"type":"widget",
|
||||
"storage": [
|
||||
{"name":"widid.wid.js","url":"widget.js"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
0.01: New Widget!
|
|
@ -0,0 +1,16 @@
|
|||
/* jshint esversion: 6 */
|
||||
(() => {
|
||||
var xpos = WIDGETPOS.tr - 16;
|
||||
WIDGETPOS.tr -= 16;
|
||||
id = NRF.getAddress().split(":");
|
||||
|
||||
// draw your widget at xpos
|
||||
function draw() {
|
||||
var x = xpos,
|
||||
y = 0;
|
||||
g.setColor(0, 0.5, 1).setFont("6x8", 1);
|
||||
g.drawString(id[4], x, 0, true);
|
||||
g.drawString(id[5], x, 10, true);
|
||||
}
|
||||
WIDGETS["widid"] = { draw: draw };
|
||||
})();
|
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue