feat(npcs): inspect cards, Show overlay, and optional external link
Clicking an NPC tile opens description cards (multi-select accordion); Show puts avatars on screen. Optional URL opens a webview tab. Avatar pan in the editor commits on pointer up. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,10 +13,19 @@ export function useNpcsOverlayState(): readonly [
|
||||
|
||||
useEffect(() => {
|
||||
void api.invoke(ipcChannels.npcsOverlay.getState, {}).then((r) => {
|
||||
setState(r.state);
|
||||
const next = r.state;
|
||||
setState({
|
||||
...next,
|
||||
inspectNpcIds: next.inspectNpcIds ?? [],
|
||||
inspectFocusNpcId: next.inspectFocusNpcId ?? null,
|
||||
});
|
||||
});
|
||||
return api.on(ipcChannels.npcsOverlay.stateChanged, ({ state: next }) => {
|
||||
setState(next);
|
||||
setState({
|
||||
...next,
|
||||
inspectNpcIds: next.inspectNpcIds ?? [],
|
||||
inspectFocusNpcId: next.inspectFocusNpcId ?? null,
|
||||
});
|
||||
});
|
||||
}, [api]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user