diff --git a/src/ui/App.tsx b/src/ui/App.tsx index 3d42523..81d3f3f 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -1,27 +1,64 @@ import { useEffect } from 'react'; import { gameRuntime } from '../state/runtime'; +import { useGameStore } from '../state/store'; import { ActionPanel } from './ActionPanel'; import { EventLog } from './EventLog'; import { ResourceBar } from './ResourceBar'; +import { SettingsDrawer } from './SettingsDrawer'; +import { StoryPanel } from './StoryPanel'; /** - * Walking-skeleton view shell. Boots the runtime once on mount; everything else - * renders from the Zustand store the runtime feeds. M1 turns this into a game. + * M1 playable-loop shell. Boots the runtime once on mount; everything else + * renders from the Zustand store the runtime feeds. */ export function App() { + const storyHasUnread = useGameStore((s) => s.storyHasUnread); + const settingsOpen = useGameStore((s) => s.settingsOpen); + const setSettingsOpen = useGameStore((s) => s.setSettingsOpen); + useEffect(() => { void gameRuntime.boot(); }, []); return ( -
-
-

Idlegame

-

Walking skeleton — M0 scaffold.

-
- - - -
+ <> + +
+
+
+

Idlegame

+
+ + +
+
+

M1 playable loop

+ +
+ + + +
+ ); } diff --git a/src/ui/SettingsDrawer.tsx b/src/ui/SettingsDrawer.tsx new file mode 100644 index 0000000..863fa73 --- /dev/null +++ b/src/ui/SettingsDrawer.tsx @@ -0,0 +1,40 @@ +import { useGameStore } from '../state/store'; +import type { ActionDetailMode, StoryOpenMode } from '../state/prefs'; + +/** Preference panel toggled from the header gear; changes persist immediately. */ +export function SettingsDrawer() { + const open = useGameStore((s) => s.settingsOpen); + const prefs = useGameStore((s) => s.prefs); + const setPrefs = useGameStore((s) => s.setPrefs); + + if (!open) return null; + + return ( +
+ + +
+ ); +}