From df79a67b937b5fc41f4dea96c04fecfc57f50591 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 31 Mar 2026 20:14:12 +0200 Subject: [PATCH] Add function to apply selected entity draft changes --- src/app/App.tsx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index e2f62b39..e7c0f0b1 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1402,6 +1402,36 @@ export function App({ store, initialStatusMessage }: AppProps) { } }; + const applySelectedEntityDraftChange = () => { + if (selectedEntity === null) { + return; + } + + switch (selectedEntity.kind) { + case "pointLight": + applyPointLightChange(); + break; + case "spotLight": + applySpotLightChange(); + break; + case "playerStart": + applyPlayerStartChange(); + break; + case "soundEmitter": + applySoundEmitterChange(); + break; + case "triggerVolume": + applyTriggerVolumeChange(); + break; + case "teleportTarget": + applyTeleportTargetChange(); + break; + case "interactable": + applyInteractableChange(); + break; + } + }; + const applySoundEmitterChange = () => { if (selectedSoundEmitter === null) { setStatusMessage("Select a Sound Emitter before editing it.");