Merge pull request #701 from Tutturuuu/patch-2

Made Date more visible
master
Gordon Williams 2021-03-23 09:18:05 +00:00 committed by GitHub
commit aba2be6c58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -23,13 +23,13 @@ function draw() {
g.drawString(time, X, Y, true /*clear background*/); g.drawString(time, X, Y, true /*clear background*/);
// draw the seconds (2x size 7 segment) // draw the seconds (2x size 7 segment)
g.setFont("7x11Numeric7Seg",2); g.setFont("7x11Numeric7Seg",2);
g.drawString(("0"+d.getSeconds()).substr(-2), X+30, Y, true /*clear background*/); g.drawString(("0"+d.getSeconds()).substr(-2), X+35, Y, true /*clear background*/);
// draw the date, in a normal font // draw the date, in a normal font
g.setFont("6x8"); g.setFont("6x8", 3);
g.setFontAlign(0,1); // align center bottom g.setFontAlign(0,1); // align center bottom
// pad the date - this clears the background if the date were to change length // pad the date - this clears the background if the date were to change length
var dateStr = " "+require("locale").date(d)+" "; var dateStr = " "+require("locale").date(d)+" ";
g.drawString(dateStr, g.getWidth()/2, Y+15, true /*clear background*/); g.drawString(dateStr, g.getWidth()/2, Y+35, true /*clear background*/);
} }
// Clear the screen once, at startup // Clear the screen once, at startup