// Touch overlay: Game Boy thumbs. Left thumb = floating virtual stick // (the whole lower-left quadrant grabs it, the base re-anchors under the // finger), right thumb = A/B caps on the classic diagonal. // // The DOM here is deliberately plain and keyed by ids: controls/touch.js // binds pointer events to #touch-zone / #touch-stick / #touch-a / #touch-b // at controller init and toggles the .live/.down classes itself. React // only owns the wrapper's visibility, so it never fights those mutations - // which is also why this component must stay mounted at all times. import Box from "@mui/material/Box"; import { useGame } from "../store.js"; import { INK, ORANGE } from "../theme.js"; export default function TouchOverlay() { const touchMode = useGame((s) => s.touchMode); const entered = useGame((s) => s.entered); const menuOpen = useGame((s) => s.menuOpen); const visible = touchMode && entered && !menuOpen; return (
Kick
Quack
); }