Skip to content

Commit 91e9a21

Browse files
committed
debugging
1 parent 5ddc829 commit 91e9a21

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

screen.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,17 @@ namespace user_interface_base {
137137
}
138138

139139

140+
/**
141+
* This doesn't use the address of the bitmaps in memory, it is a naive solution.
142+
*/
140143
public static drawTransparentImage(from: Bitmap, x: number, y: number) {
141-
let index = 0;
142-
143144
for (let i = 0; i < this.bitmapCache.length; i++) {
144145
if (this.bitmapCache[i] == from) {
145-
index = i;
146-
break;
146+
radio.sendBuffer(Buffer.fromArray([SCREEN_FN_ID_DRAW_TRANSPARENT_IMAGE, i, x, y]));
147+
this.waitForAck();
148+
return;
147149
}
148150
}
149-
basic.showNumber(index);
150-
radio.sendBuffer(Buffer.fromArray([SCREEN_FN_ID_DRAW_TRANSPARENT_IMAGE, index, x, y]));
151-
this.waitForAck();
152151
}
153152

154153

0 commit comments

Comments
 (0)