From 37c87286968c4c2bc0e46daea20aa69a1d70d450 Mon Sep 17 00:00:00 2001 From: James Stanley Date: Wed, 17 Mar 2021 14:27:22 +0000 Subject: [PATCH] Make counter work even when widgets are not visible, and always draw in white --- apps/counter/counter.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/counter/counter.js b/apps/counter/counter.js index 86db23ba9..bc5c4ed96 100644 --- a/apps/counter/counter.js +++ b/apps/counter/counter.js @@ -1,9 +1,8 @@ var counter = 0; -g.setColor(0xFFFF); - function updateScreen() { g.clearRect(0, 50, 250, 150); + g.setColor(0xFFFF); g.setFont("Vector",40).setFontAlign(0,0); g.drawString(Math.floor(counter), g.getWidth()/2, 100); g.drawString('-', 45, 100); @@ -46,5 +45,4 @@ Bangle.loadWidgets(); Bangle.drawWidgets(); // TODO: Enable saving counts to file -// Does not work if widgets are not visible // Add small watch