Display lists

This commit is contained in:
James Babcock committed 2026-09-22 00:25:40 -07:00
1 parent a7af84e231
commit 4320021222
44 files changed
+823 -284

No files matched your search

+6 -2
View File
@@ -1,3 +1,4 @@
import { encodeShellScene } from "../../graphics/shell-scene";
import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage } from "../../graphics/image";
import { singlePlane, type Plane } from "../../graphics/plane";
import { getDefaultSmallFont } from "../../graphics/ui-fonts";
@@ -229,6 +230,7 @@ class ShellOverlayMenuLayer extends MenuLayer {
y: minWindowTop() + TOP_BAR_HEIGHT + 8,
width,
minHeight: 150,
squareCorners: true,
footer,
dimUnderneath: CONTEXT_MENU_DIM,
});
@@ -266,8 +268,8 @@ class ShellAlertLayer implements Layer {
const font = getDefaultSmallFont();
// Positioned within the min-height window band, like the other shell overlays.
const alertY = minWindowTop() + ALERT_Y;
image.fillRoundedRect(ALERT_X, alertY, ALERT_W, ALERT_H, 1, 10);
image.drawRoundedRect(ALERT_X, alertY, ALERT_W, ALERT_H, 90, 10);
image.fillRect(ALERT_X, alertY, ALERT_W, ALERT_H, 1);
image.drawRect(ALERT_X, alertY, ALERT_W, ALERT_H, 90);
image.drawText(font, ALERT_X + 16, alertY + 12, "Assistant", 200);
image.drawTextWrapped({
font,
@@ -690,6 +692,8 @@ class Shell {
}
/** Paint the shell surface: transparent chrome, or all-transparent when asleep. */
paintScene(): Uint8Array { return encodeShellScene(this.screenOn ? this.stack.paintUndimmed() : []); }
paintSurface(): Plane[] {
if (!this.screenOn) {
return singlePlane(new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0));