Create app.js

master
Marco H 2021-11-30 08:36:28 +01:00 committed by GitHub
parent 8775a6f339
commit c822b62789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

13
apps/poweroff/app.js Normal file
View File

@ -0,0 +1,13 @@
g.clear();
g.setFont("6x8",2).setFontAlign(0,0);
var x = g.getWidth()/2;
var y = g.getHeight()/2 + 10;
g.drawString("Powering off...", x, y);
setTimeout(function() {
if (Bangle.softOff) Bangle.softOff(); else Bangle.off();
}, 1000);
Bangle.loadWidgets();
Bangle.drawWidgets();