From 701b48dfeedff74a1d7e7d93cf7b581b8f32fab6 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Tue, 14 Apr 2026 13:55:25 -0700 Subject: [PATCH] arena.mjs: add debug logging to diagnose arrow graphics issue Added console logs to check: 1. Whether button buffers are being created in boot() 2. Whether paste() function is available when rendering buttons 3. Which buffers exist and are being used This will help diagnose why arrow graphics aren't displaying. Co-Authored-By: Claude Haiku 4.5 --- system/public/aesthetic.computer/disks/arena.mjs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/system/public/aesthetic.computer/disks/arena.mjs b/system/public/aesthetic.computer/disks/arena.mjs index 34e06ca3b3..f17ce32017 100644 --- a/system/public/aesthetic.computer/disks/arena.mjs +++ b/system/public/aesthetic.computer/disks/arena.mjs @@ -529,6 +529,9 @@ function boot({ Form, penLock, system, screen, ui, api, painting }) { plot(6, 10); plot(6, 18); }); + + // Debug: log created buffers + console.log("🎨 Button buffers created:", Object.keys(buttonBuffers)); } @@ -1455,10 +1458,14 @@ function paint({ wipe, ink, screen, write, box, system, pen, canvas, api, painti const buffer = buttonBuffers[bufferName]; if (buffer) { - // Render pixel graphics (centered in button) - const centerX = b.box.x + (b.box.w - buffer.width) / 2; - const centerY = b.box.y + (b.box.h - buffer.height) / 2; - paste(buffer, centerX, centerY); + if (!paste) { + console.log(`⚠️ paste not available for button ${name}`); + } else { + // Render pixel graphics (centered in button) + const centerX = b.box.x + (b.box.w - buffer.width) / 2; + const centerY = b.box.y + (b.box.h - buffer.height) / 2; + paste(buffer, centerX, centerY); + } } }); } -- 2.54.0