Created
December 5, 2019 13:34
-
-
Save aallan/f1170a6717d8bea50cdc5edddc009d24 to your computer and use it in GitHub Desktop.
Additional code to add widgets into a Bangle.js application when using the Web IDE. Needs to be included at the top of your code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WIDGETPOS={tl:32,tr:g.getWidth()-32,bl:32,br:g.getWidth()-32}; | |
var WIDGETS={}; | |
function drawWidgets() { for (var w of WIDGETS) w.draw(); } | |
require("Storage").list().filter(a=>a[0]=='=').forEach(widget=>eval(require("Storage").read(widget))); | |
setTimeout(drawWidgets,100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment