diff options
Diffstat (limited to 'test-client/visual.ts')
-rw-r--r-- | test-client/visual.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test-client/visual.ts b/test-client/visual.ts index a54ca143..4c0a8ecc 100644 --- a/test-client/visual.ts +++ b/test-client/visual.ts @@ -120,9 +120,9 @@ function draw_item(item: ItemData) { ctx.translate(item.x, item.y) if (item.remove_anim) ctx.scale(1 - item.remove_anim, 1 - item.remove_anim) draw_item_sprite(ctx, data.item_names[item.kind] as ItemName) - if (item.progress !== null && item.progress !== undefined) { - ctx.fillStyle = item.progress_warn ? "rgba(230, 58, 58, 0.66)" : "rgba(115, 230, 58, 0.66)" - ctx.fillRect(-0.5, -0.5, 1, item.progress) + if (item.active) { + ctx.fillStyle = item.active.warn ? "rgba(230, 58, 58, 0.66)" : "rgba(115, 230, 58, 0.66)" + ctx.fillRect(-0.5, -0.5, 1, item.active.position) } ctx.restore() } |