BangleApps/apps/_example_widget/widget.js

17 lines
410 B
JavaScript
Raw Normal View History

/* run widgets in their own function scope so they don't interfere with
currently-running apps */
(() => {
2020-02-07 17:09:18 +00:00
// add the width
var xpos = WIDGETPOS.tr-24;/*<the widget width>*/;
WIDGETPOS.tr-= 28;/* the widget width plus some extra pixel to keep distance to others */;
2020-02-07 17:09:18 +00:00
// draw your widget at xpos
function draw() {
// add your code
}
2020-02-07 17:09:18 +00:00
// add your widget
WIDGETS["mywidget"]={draw:draw};
})()