mirror of https://github.com/espruino/BangleApps
iconbits: add loading/preview functions
parent
24ebb8a583
commit
2d4ad4a756
|
@ -223,7 +223,8 @@ Bangle.on("lock", function() {
|
|||
}
|
||||
|
||||
function update() {
|
||||
g.drawImage(sg, 4, 64, {});
|
||||
if (zoom_f < 3)
|
||||
g.drawImage(sg, 4, 64, {});
|
||||
g.drawImage(sg, zoom_x, zoom_y, { scale: zoom_f });
|
||||
}
|
||||
|
||||
|
@ -370,3 +371,20 @@ function show_icon(icon) {
|
|||
show_bin_icon(unc);
|
||||
}
|
||||
|
||||
function load_bin_icon(i) {
|
||||
sg.reset().clear();
|
||||
sg.drawImage(i, 0, 0);
|
||||
drawArea();
|
||||
}
|
||||
|
||||
function load_icon(icon) {
|
||||
unc = require("heatshrink").decompress(atob(icon));
|
||||
load_bin_icon(unc);
|
||||
}
|
||||
|
||||
function for_screen() {
|
||||
g.reset().clear();
|
||||
icon_big();
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue