Fixing some bugs. fixing some scroll issues

This commit is contained in:
Dustin Swan 2026-02-15 21:25:51 -07:00
parent 6f217a0923
commit 5c76f9f3a2
No known key found for this signature in database
GPG key ID: 30D46587E2100467
6 changed files with 25 additions and 16 deletions

View file

@ -128,9 +128,10 @@ function renderUI(ui: UIValue, ctx: CanvasRenderingContext2D, x: number, y: numb
ctx.beginPath();
ctx.rect(x, y, ui.w, ui.h);
ctx.clip();
renderUI(ui.child, ctx, x - ui.scrollX, y - ui.scrollY);
ctx.restore();
scrollRegions.push({ x, y, width: ui.w, height: ui.h, onScroll: ui.onScroll })
renderUI(ui.child, ctx, x - ui.scrollX, y - ui.scrollY);
// console.log("scrollable onScroll after render:", ui.onScroll, ui.w, ui.h)
ctx.restore();
break;
}