From 41edc270486f0c9dde1144bb61328df6bfb75d3d Mon Sep 17 00:00:00 2001 From: FromTheLOLAshes <153381408+FromTheLOLAshes@users.noreply.github.com> Date: Thu, 23 May 2024 14:42:33 -0400 Subject: [PATCH] Show the preview button when in camera mode (#421) Co-authored-by: Christopher Oliphant --- .../itemTabs/StylizeTab/StyleButtons.tsx | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/app/pages/PageEnigma/comps/SidePanelTabs/itemTabs/StylizeTab/StyleButtons.tsx b/app/pages/PageEnigma/comps/SidePanelTabs/itemTabs/StylizeTab/StyleButtons.tsx index d4adeedbfa..ff5c9282df 100644 --- a/app/pages/PageEnigma/comps/SidePanelTabs/itemTabs/StylizeTab/StyleButtons.tsx +++ b/app/pages/PageEnigma/comps/SidePanelTabs/itemTabs/StylizeTab/StyleButtons.tsx @@ -12,9 +12,9 @@ import { toEngineActions } from "~/pages/PageEnigma/Queue/toEngineActions"; import { Switch } from "@headlessui/react"; import PremiumLock from "~/components/PremiumLock"; import { - upscale, faceDetail, styleStrength, + upscale, } from "~/pages/PageEnigma/signals/stylizeTab"; export function StyleButtons() { @@ -25,6 +25,13 @@ export function StyleButtons() { }; const switchPreview = async () => { + if (editorState.value === EditorStates.EDIT) { + Queue.publish({ + queueName: QueueNames.TO_ENGINE, + action: toEngineActions.ENTER_EDIT_STATE, + data: null, + }); + } Queue.publish({ queueName: QueueNames.TO_ENGINE, action: toEngineActions.ENTER_PREVIEW_STATE, @@ -56,7 +63,7 @@ export function StyleButtons() {
(This helps you test and re-test your scene)
- {editorState.value === EditorStates.EDIT && ( + {editorState.value !== EditorStates.PREVIEW && ( <>