Files
healer-man/src/ui/HudSurface.tsx
T
2026-09-14 13:20:20 -04:00

10 lines
416 B
TypeScript

import { createContext, useContext } from "react";
import type { HudElementId, HudElementLayout } from "../game/uiLayout";
export const HudSurfaceContext = createContext<{
surface: "top" | "bottom";
onChange?: (id: HudElementId, update: Partial<HudElementLayout>) => void;
onResurrect?: (checkpointId: string) => void;
}>({ surface: "top" });
export const useHudSurface = () => useContext(HudSurfaceContext);