diff --git a/apps/iconbits/README.md b/apps/iconbits/README.md index c5c524ab0..90bc0f5a3 100644 --- a/apps/iconbits/README.md +++ b/apps/iconbits/README.md @@ -3,5 +3,18 @@ Bitmap editor suitable for creating icons and fonts for BangleJS2. You'll want to run a copy of this in simulator, and another one on -watch to view the results. Draw using the provided tools, then press -the button, and you'll get result on the console. +watch to view the results. + +Draw using the provided tools, then press the button, and you'll get +result on the console; you can also use "dump();" on command +line. show_icon() takes same parameter as is used in app-icon.js +files, you can just copy&paste it to get an icon. By using +"for_screen();" command, then taking a screenshot, you can easily +generate app.png file. + +It is also possible to load existing icon into editor, using +"load_icon("");" command. At the end of iconbits.app.js file there are +more utility functions. + + + diff --git a/apps/iconbits/iconbits.app.js b/apps/iconbits/iconbits.app.js index 1777a8af3..83eb8ee89 100644 --- a/apps/iconbits/iconbits.app.js +++ b/apps/iconbits/iconbits.app.js @@ -235,11 +235,9 @@ Bangle.on("lock", function() { } function do_draw(from, to) { - print("do-draw", from, to); from = transform(from); to = transform(to); if (from && to) { - print("__draw", from, to); __draw(sg, from, to); } update(); @@ -327,7 +325,6 @@ Bangle.on("lock", function() { if (!line_from) { line_from = to; } else { - print("draw -- ", line_from, to); do_draw(line_from, to); line_from = null; } @@ -335,7 +332,8 @@ Bangle.on("lock", function() { } drawUtil(); } - function on_btn(n) { + +function dump(n) { function f(i) { return "\\x" + i.toString(16).padStart(2, '0'); } @@ -361,7 +359,7 @@ drawArea(); Bangle.setUI({ "mode": "custom", "drag": on_drag, - "btn": on_btn, + "btn": dump, }); drawUtil();