- Bump @valknar/vpinball-wasm to 0.3.2 (PinMAME ROM support, MsgBox fix) - Add optional PinMAME ROM .zip upload alongside .vpx tables - Persist uploaded tables/ROMs in IndexedDB so users don't have to re-upload on later visits, with a library list on the landing page - Fix Insert Coin key mismatch with the engine's real coin-door gating (now bound to 4, matching the shared table scripts) and surface it in the controls legend and "Tap to Start" hint - Make the landing page, staging panel, and in-game HUD responsive for portrait phone widths; drop the landscape hint since portrait plays fine - Replace the separate STATS HUD toggle with an FPS row in the info panel Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9JmzRBZenapVkFWjw9jmG
20 lines
739 B
TypeScript
20 lines
739 B
TypeScript
// In-memory handoff for the user's table choice between the landing page
|
|
// and /play — a File can't survive a URL-based navigation, and this is a
|
|
// single-shot value read once on mount, so module-level state is sufficient
|
|
// (no need for anything heavier than a plain variable).
|
|
export type PendingSelection =
|
|
| { kind: "upload"; vpxFile: File; romFile?: File; saveToLibrary: boolean }
|
|
| { kind: "library"; id: string };
|
|
|
|
let pendingSelection: PendingSelection | null = null;
|
|
|
|
export function setPendingTable(selection: PendingSelection): void {
|
|
pendingSelection = selection;
|
|
}
|
|
|
|
export function takePendingTable(): PendingSelection | null {
|
|
const selection = pendingSelection;
|
|
pendingSelection = null;
|
|
return selection;
|
|
}
|