From 37a37ef0a6c0d8a583313fe9557a383a069f15c4 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 03:49:23 +0200 Subject: [PATCH] Add handlers for creating scenes and changing active scenes --- src/app/App.tsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index b7e74997..254e7127 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -2447,6 +2447,30 @@ export function App({ store, initialStatusMessage }: AppProps) { setStatusMessage(`Scene renamed to ${normalizedName}.`); }; + const handleCreateScene = () => { + store.executeCommand(createCreateSceneCommand()); + setStatusMessage("Created a new scene."); + }; + + const handleActiveSceneChange = ( + event: ChangeEvent + ) => { + const nextSceneId = event.currentTarget.value; + + if (nextSceneId === editorState.activeSceneId) { + return; + } + + const nextScene = editorState.projectDocument.scenes[nextSceneId]; + + if (nextScene === undefined) { + return; + } + + store.executeCommand(createSetActiveSceneCommand(nextSceneId)); + setStatusMessage(`Switched to scene ${nextScene.name}.`); + }; + const requestViewportFocus = ( selection: EditorSelection, status?: string