2022-05-14 08:38:37 +00:00
|
|
|
WIDGETS["bluetooth"]={area:"tr",draw:function() {
|
|
|
|
if (WIDGETS.bluetooth.width==0)
|
|
|
|
return;
|
2021-10-22 07:54:44 +00:00
|
|
|
g.reset();
|
2022-05-18 17:18:42 +00:00
|
|
|
g.setColor((g.getBPP()>8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f"));
|
2021-10-22 07:54:44 +00:00
|
|
|
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),2+this.x,2+this.y);
|
|
|
|
},changed:function() {
|
2022-05-18 17:31:52 +00:00
|
|
|
WIDGETS.bluetooth.width = NRF.getSecurityStatus().connected?15:0;
|
2022-05-18 17:18:42 +00:00
|
|
|
Bangle.drawWidgets();
|
|
|
|
},width:NRF.getSecurityStatus().connected?15:0
|
|
|
|
};
|
2022-05-14 08:38:37 +00:00
|
|
|
NRF.on('connect',WIDGETS.bluetooth.changed);
|
|
|
|
NRF.on('disconnect',WIDGETS.bluetooth.changed);
|