-
• #2
Yeah, that's a known limitation.
If you use
g.clearRect
to clear just the affected area before callingdrawString
the flicker shouldn't be too noticeable. -
• #3
I tried that, but it's noticeable... And I wonder why on the DigiClock app, it seems to work fine.
-
• #4
Is there any other code between the call to
g.clearRect
and the call tog.drawString
? -
• #5
setFont and setFontAlign only.
My concern is finding why
require("Font7x11Numeric7Seg").add(Graphics);
is giving me an error Module Font7x11Numeric7Seg not found.
The first time I tried the clock tutorial, it worked, but now throws error. Downloaded app digiClock works, however.
-
• #6
Yes, not clearing behind for Vector fonts is expected right now. I'll get a fix in for the 2v11 version though.
Module Font7x11Numeric7Seg not found.
Are you pasting into the left-hand side of the IDE? If a module isn't built in the IDE loads it dynamically, but it can only do that for code that you load from the right-hand side.
-
• #7
No, I'm uploading the code directly from the storage icon. That was my mistake.
Thanks Gordon -
• #8
Ahh, right - yes, once files are in the app loader (or using the RHS of the IDE) then any dependencies are automatically handled.
I've heard of others uploading using the Storage icon - did you see a suggestion for that somewhere? I guess potentially the IDE could provide the option to parse JS files that are uploaded that way as well...
-
• #9
I feel using the icon a faster method because many of us prefer to edit code with an external editor, that's my suggestion. But it's great as it is.
-
• #10
many of us prefer to edit code with an external editor
As I recently discovered: the arrow below "open file" has a "Watch and upload" option, which actually works pretty nice with external editors. (as long as you only work on a single file)
-
• #11
Thanks.
Still trying to understand why this gives unknown font on my codeModules.addCached("Font7x11Numeric7Seg",function(){exports.add=function(a){a.prototype.setFont7x11Numeric7Seg=function(){this.setFontCustom(atob("AAAAAAAAAAAAAAEAAAAQAgBACAAAAHvQBgDAGAL3gAAAAAAAAAAHvAAA9CGEMIYQvAAAACEMIYQwhe8AB4AIAQAgBA94ADwIQwhhDCEDwAHvQhhDCGEIHgAAAgBACAEAHvAAe9CGEMIYQveAA8CEMIYQwhe8AAABjDGAAAA96EEIIQQge8AB7wIQQghBCB4AD3oAwBgDAEAAAAPAhBCCEEL3gAPehDCGEMIQAAAe9CCEEIIQAAAAAAAA"),32,atob("BwAAAAAAAAAAAAAAAAcCAAcHBwcHBwcHBwcFAAAAAAAABwcHBwcH"),11)}}}); // Load fonts require("Font7x11Numeric7Seg").add(Graphics); Bangle.setLCDTimeout(40); function myFunction(txt) { g.reset(); g.setFont("Font7x11Numeric7Seg",4); g.setFontAlign(0,0); g.drawString(txt, 130, 120, true); } g.clear(); myFunction("12:20");
-
• #12
Can't see the mistake but solved by copying from draw() function.
How to add a new clock to the "settings/select clock" menu?
-
• #13
You just need
g.setFont("7x11Numeric7Seg",4);
notg.setFont("Font7x11Numeric7Seg",4);
:)
For some reason with the font "Vector" the drawString command like
it's not clearing the background. It's just a simple clock and I don't want to use g.clear as it flickers the screen every second.
Thanks for the help