Make modifier modal working

This commit is contained in:
ducdat0507 2022-12-22 20:07:37 +07:00
parent d58a48f39d
commit c8c6ba8f62

View file

@ -16,8 +16,8 @@ import _cursor from "./factory-components/cursor.svg";
import _delete from "./factory-components/delete.svg"; import _delete from "./factory-components/delete.svg";
import _rotateLeft from "./factory-components/rotateLeft.svg"; import _rotateLeft from "./factory-components/rotateLeft.svg";
import _rotateRight from "./factory-components/rotateRight.svg"; import _rotateRight from "./factory-components/rotateRight.svg";
import _wood from "./factory-components/rotate_rectangle.png"; import _wood from "./factory-components/log.svg";
import _block from "./factory-components/rotate_rectangle.png"; import _block from "./factory-components/block.svg";
import _cloth from "./factory-components/rotate_rectangle.png"; import _cloth from "./factory-components/rotate_rectangle.png";
import _dye from "./factory-components/rotate_rectangle.png"; import _dye from "./factory-components/rotate_rectangle.png";
import _clothes from "./factory-components/rotate_rectangle.png"; import _clothes from "./factory-components/rotate_rectangle.png";
@ -150,7 +150,7 @@ const factory = createLayer(id, () => {
key: "Escape", key: "Escape",
name: "Cursor", name: "Cursor",
type: "command", type: "command",
description: "Drag to move around.", description: "Drag while equipping this to move around.",
tick: 0 tick: 0
}, },
delete: { delete: {
@ -171,7 +171,7 @@ const factory = createLayer(id, () => {
}, },
rotateRight: { rotateRight: {
imageSrc: _rotateRight, imageSrc: _rotateRight,
key: "shift+t", key: "shift+T",
name: "Rotate Right", name: "Rotate Right",
type: "command", type: "command",
description: "Use this to rotate components clockwise.", description: "Use this to rotate components clockwise.",
@ -1037,7 +1037,11 @@ const factory = createLayer(id, () => {
{whatIsHovered.value === "" ? undefined : ( {whatIsHovered.value === "" ? undefined : (
<> <>
<h3> <h3>
{FACTORY_COMPONENTS[whatIsHovered.value].name} {FACTORY_COMPONENTS[whatIsHovered.value].name +
" "}
<HotkeyVue
hotkey={hotkeys[whatIsHovered.value]}
/>
</h3> </h3>
<br /> <br />
{ {
@ -1227,9 +1231,13 @@ const factory = createLayer(id, () => {
components, components,
tabs, tabs,
generalTabCollapsed, generalTabCollapsed,
modifiersModal,
hotkeys, hotkeys,
display: jsx(() => <>{render(tabs)}</>) display: jsx(() => (
<>
{render(modifiersModal)}
{render(tabs)}
</>
))
}; };
}); });
export default factory; export default factory;