reordered app.js again

master
eleanor 2023-04-04 10:02:35 -05:00 committed by GitHub
parent 08e7d14b08
commit ce144e05ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -58,7 +58,7 @@ function queueDraw() {
}, 60000 - (Date.now() % 60000)); }, 60000 - (Date.now() % 60000));
} }
function draw() { function time(){
var time = locale.time(d, 1); var time = locale.time(d, 1);
var date = locale.date(d); var date = locale.date(d);
var mo = dateutil.month(d.getMonth() + 1, 1); var mo = dateutil.month(d.getMonth() + 1, 1);
@ -67,16 +67,18 @@ function draw() {
g.setFont("HaxorNarrow7x17").setColor(0,0,0); g.setFont("HaxorNarrow7x17").setColor(0,0,0);
g.setFontAlign(0, 0).setFont(currentFont, 7).drawString(time, width/2, 100); g.setFontAlign(0, 0).setFont(currentFont, 7).drawString(time, width/2, 100);
g.setFontAlign(0,0).setFont(currentFont, 3).drawString(mo + " " + nowDate, width/2, 130); g.setFontAlign(0,0).setFont(currentFont, 3).drawString(mo + " " + nowDate, width/2, 130);
}
Bangle.drawWidgets(); //redraw
function draw() {
time();
queueDraw(); queueDraw();
} }
//ready set go! //ready set go!
g.clear(); g.clear();
draw(); //draw all the things
Bangle.setUI("clock"); Bangle.setUI("clock");
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
draw(); //draw all the things