Skip to content

Commit

Permalink
JS: Small improvements to widget example
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Mar 28, 2024
1 parent a1eeeb2 commit 58b8a13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions applications/system/js_app/examples/apps/Scripts/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ widget.addCircle(12, 52, 10);
widget.addDisc(12, 52, 5);

// add a frame/box (x, y, width, height)
widget.addFrame(25, 45, 10, 10);
widget.addBox(27, 47, 6, 6);
widget.addFrame(30, 45, 10, 10);
widget.addBox(32, 47, 6, 6);

// add a rounded frame/box (x, y, width, height, radius)
widget.addRframe(50, 45, 15, 15, 3);
Expand All @@ -38,7 +38,7 @@ widget.addIcon(100, 50, "ButtonUp_7x4");
widget.addIcon(100, 55, "ButtonDown_7x4");

// add a glyph (x, y, glyph)
widget.addGlyph(120, 50, 0x23);
widget.addGlyph(115, 50, "#".charCodeAt(0));

// Show the widget (drawing the layers in the orderer they were added)
widget.show();
Expand All @@ -52,7 +52,7 @@ while (widget.isOpen() && i <= demo_seconds) {
// You can call remove on any added item, it does not impact the other ids.
if (bitmap) { widget.remove(bitmap); bitmap = undefined; }
// All of the addXXX functions return an id that can be used to remove the item.
else { bitmap = widget.addXbm(80, 45, logo); }
else { bitmap = widget.addXbm(77, 45, logo); }

delay(1000);
}
Expand Down

0 comments on commit 58b8a13

Please sign in to comment.