master
MaBecker 2020-03-04 20:59:27 +01:00
parent ab356fd619
commit 2c1397ab92
4 changed files with 27 additions and 0 deletions

View File

@ -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 tupple of you Bangle.js address in the widget section.",
"tags": "widget",
"type":"widget",
"storage": [
{"name":"widid.wid.js","url":"widget.js"}
]
}
]

1
apps/widid/ChangeLog Normal file
View File

@ -0,0 +1 @@
0.01: New Widget!

15
apps/widid/widget.js Normal file
View File

@ -0,0 +1,15 @@
/* */
(() => {
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(addr[4],x,0,true);
g.drawString(addr[5],x,10),true;
}
WIDGETS["widid"]={draw:draw};
})()

BIN
apps/widid/widget.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB