diff --git a/app/components/TransitionDialogue.tsx b/app/components/TransitionDialogue.tsx index b6101ba65f..122a295546 100644 --- a/app/components/TransitionDialogue.tsx +++ b/app/components/TransitionDialogue.tsx @@ -2,17 +2,21 @@ import { useEffect } from "react"; import { Dialog, Transition } from "@headlessui/react"; import { Fragment, ReactNode } from "react"; import { twMerge } from "tailwind-merge"; -import { disableHotkeyInput, enableHotkeyInput, DomLevels } from "~/pages/PageEnigma/store"; +import { + disableHotkeyInput, + enableHotkeyInput, + DomLevels, +} from "~/pages/PageEnigma/store"; -const DialogBackdrop = ()=>{ - useEffect(()=>{ +const DialogBackdrop = () => { + useEffect(() => { disableHotkeyInput(DomLevels.DIALOGUE); - return()=>{ + return () => { enableHotkeyInput(DomLevels.DIALOGUE); - } + }; }, []); - return( + return ( { enterTo="opacity-100" leave="ease-in duration-200" leaveFrom="opacity-100" - leaveTo="opacity-0" - > + leaveTo="opacity-0">
); }; export const TransitionDialogue = ({ - isOpen, title, onClose, className, children, -}:{ + isOpen, + title, + onClose, + className, + children, +}: { isOpen: boolean; title?: ReactNode; - onClose:()=>void; + onClose: () => void; className?: string; children: ReactNode; - -})=>{ - return( +}) => { + return ( - - -
-
- - - {title && ( - - {title} - - )} - {children} - - -
+ + +
+
+ + + {title && ( + + {title} + + )} + {children} + +
-
- +
+
+
); -}; \ No newline at end of file +}; diff --git a/app/modules/ButtonDialogue/ButtonDialogue.tsx b/app/modules/ButtonDialogue/ButtonDialogue.tsx index e83bf0c149..f6aba3a01a 100644 --- a/app/modules/ButtonDialogue/ButtonDialogue.tsx +++ b/app/modules/ButtonDialogue/ButtonDialogue.tsx @@ -8,11 +8,12 @@ interface ButtonDialoguePropsI { buttonProps?: UnionedButtonProps; confirmButtonProps?: UnionedButtonProps; closeButtonProps?: UnionedButtonProps; - dialogProps?:{ + dialogProps?: { className?: string; }; title?: string; children: React.ReactNode; + showClose?: boolean; } export const ButtonDialogue = ({ @@ -22,6 +23,7 @@ export const ButtonDialogue = ({ closeButtonProps: unionedCloseButtonProps, title, children, + showClose = true, }: ButtonDialoguePropsI) => { const [isOpen, setIsOpen] = useState(false); @@ -43,19 +45,20 @@ export const ButtonDialogue = ({ title={title} isOpen={isOpen} onClose={closeModal} - className={dialogProps.className} - > -
{children}
+ className={dialogProps.className}> +
{children}
- + {showClose && ( + + )} + {confirmButtonProps && ( )}
- + ); }; diff --git a/app/pages/PageEnigma/comps/ControlsTopButtons/ControlsTopButtons.tsx b/app/pages/PageEnigma/comps/ControlsTopButtons/ControlsTopButtons.tsx index 07ab5dd9cd..2925797ad4 100644 --- a/app/pages/PageEnigma/comps/ControlsTopButtons/ControlsTopButtons.tsx +++ b/app/pages/PageEnigma/comps/ControlsTopButtons/ControlsTopButtons.tsx @@ -6,6 +6,7 @@ import { ToasterContext } from "~/contexts/ToasterContext"; // import { APPUI_ACTION_TYPES } from "app/reducers"; import { TestFeaturesButtons } from "./TestFeaturesButtons"; +import { Help } from "./Help"; export const ControlsTopButtons = () => { const editorEngine = useContext(EngineContext); @@ -49,8 +50,7 @@ export const ControlsTopButtons = () => { label: "Load", disabled: sceneToken === "", onClick: handleButtonLoadScene, - }} - > + }}> { @@ -69,8 +69,7 @@ export const ControlsTopButtons = () => { label: "Save", disabled: sceneName === "", onClick: handleButtonSave, - }} - > + }}> { @@ -89,8 +88,7 @@ export const ControlsTopButtons = () => { disabled: mediaToken === "", onClick: handleMediaToken, }} - title="Add Scene Object via Media Token" - > + title="Add Scene Object via Media Token"> { @@ -104,15 +102,14 @@ export const ControlsTopButtons = () => { variant: "secondary", label: "Help", }} - title="Help" - > -

Do you need help?

-

Ask Michael about this project

-

Ask Miles about ThreeJS

-

Ask Wil about React

+ dialogProps={{ + className: "max-w-6xl w-auto", + }} + title="Help"> +
- + ); }; diff --git a/app/pages/PageEnigma/comps/ControlsTopButtons/Help/Help.tsx b/app/pages/PageEnigma/comps/ControlsTopButtons/Help/Help.tsx new file mode 100644 index 0000000000..c35bc37854 --- /dev/null +++ b/app/pages/PageEnigma/comps/ControlsTopButtons/Help/Help.tsx @@ -0,0 +1,144 @@ +import { Label } from "~/components"; + +const ShortcutsGroup = (props: { + label: string; + children?: React.ReactNode; +}) => ( +
+ +
+ {props.children} +
+
+
+); + +const Shortcut = (props: { label: string; children: React.ReactNode }) => ( +
+ + {props.label} + + {props.children} +
+); + +const Key = (props: { button: string }) => ( +
+ {props.button} +
+); + +const KeyGroup = (props: { children: React.ReactNode }) => ( +
{props.children}
+); + +const Mouse = (props: { + button: "left" | "middle" | "right"; + label: string; +}) => ( +
+ {`${props.button} + {props.label} +
+); + +const Plus = () =>
+
; + +export const Help = () => { + return ( +
+
+ + + + + + + + + + + {/* + + + + + + + + + */} + + + + + + + {/* + + */} + {/* + + */} + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + {/* + + + + */} + + + + + + + + + + +
+
+ ); +}; diff --git a/app/pages/PageEnigma/comps/ControlsTopButtons/Help/index.tsx b/app/pages/PageEnigma/comps/ControlsTopButtons/Help/index.tsx new file mode 100644 index 0000000000..c6b98f7c78 --- /dev/null +++ b/app/pages/PageEnigma/comps/ControlsTopButtons/Help/index.tsx @@ -0,0 +1 @@ +export { Help } from "./Help"; diff --git a/public/resources/icons/mouse_lmb.png b/public/resources/icons/mouse_lmb.png new file mode 100644 index 0000000000..7cd1073f08 Binary files /dev/null and b/public/resources/icons/mouse_lmb.png differ diff --git a/public/resources/icons/mouse_mmb.png b/public/resources/icons/mouse_mmb.png new file mode 100644 index 0000000000..eea44942db Binary files /dev/null and b/public/resources/icons/mouse_mmb.png differ diff --git a/public/resources/icons/mouse_rmb.png b/public/resources/icons/mouse_rmb.png new file mode 100644 index 0000000000..10ddd409dd Binary files /dev/null and b/public/resources/icons/mouse_rmb.png differ