widid
parent
ab356fd619
commit
2c1397ab92
11
apps.json
11
apps.json
|
|
@ -800,5 +800,16 @@
|
||||||
{"name":"torch.wid.js","url":"widget.js"},
|
{"name":"torch.wid.js","url":"widget.js"},
|
||||||
{"name":"torch.img","url":"app-icon.js","evaluate":true}
|
{"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"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
0.01: New Widget!
|
||||||
|
|
@ -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};
|
||||||
|
})()
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue