Refinements to bulitin games

All: settings persistence
All: pause on menu
Flappy: both swipe directions trigger flaps
Freecell: skip irrelevant locations
Blocks: Lower speed/difficulty
Pinball: remove the half-implemented Nudge gesture.
This commit is contained in:
James Babcock committed 2026-09-12 23:50:23 -07:00
1 parent 937c73d81b
commit c9e95a3f69
12 files changed
+317 -108

No files matched your search

+9
View File
@@ -21,6 +21,12 @@ export type WorkerAppMessage =
| { type: "text-input"; windowId: string; text: string }
| { type: "render"; windowId: string; focused: boolean }
| { type: "foreground"; windowId: string; foreground: boolean; focused: boolean }
/**
* Input focus arrived at or left the window, counting shell overlays and
* screen-off (see ShellWindow.setInputFocus). Sent on change only; the
* per-message `focused` flags above stay the source of truth for painting.
*/
| { type: "input-focus"; windowId: string; focused: boolean }
| { type: "screen"; on: boolean }
/** Assistant tool invocation aimed at a window; reply with tool-result. */
| { type: "tool-call"; callId: string; windowId: string; name: string; args: unknown };
@@ -421,6 +427,9 @@ export class WorkerAppHost {
// uniform; the worker treats it globally.
this.post({ type: "screen", on });
},
setInputFocus: (focused) => {
this.post({ type: "input-focus", windowId: spec.windowId, focused });
},
};
shell.registerWindow(window);
// Configure the surface before any foregrounding so the worker's first