@rpg-engine/long-bow 0.1.68 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Abstractions/SlotsContainer.d.ts +11 -0
- package/dist/components/DraggableContainer.d.ts +3 -2
- package/dist/components/Equipment/EquipmentSet.d.ts +13 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +10 -2
- package/dist/components/Item/Inventory/itemContainerHelper.d.ts +6 -2
- package/dist/components/Item/SpriteFromAtlas.d.ts +2 -0
- package/dist/components/Multitab/Tab.d.ts +9 -0
- package/dist/components/Multitab/TabBody.d.ts +7 -0
- package/dist/components/Multitab/TabsContainer.d.ts +17 -0
- package/dist/components/SimpleProgressBar.d.ts +3 -4
- package/dist/components/SkillProgressBar.d.ts +6 -4
- package/dist/components/SkillsContainer.d.ts +7 -0
- package/dist/components/store/UI.store.d.ts +34 -0
- package/dist/constants/uiColors.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +5258 -419
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +5260 -420
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/mocks/equipmentSet.mocks.d.ts +3 -0
- package/dist/mocks/skills.mocks.d.ts +115 -0
- package/package.json +5 -3
- package/src/components/Abstractions/SlotsContainer.tsx +42 -0
- package/src/components/DraggableContainer.tsx +65 -38
- package/src/components/Equipment/EquipmentSet.tsx +179 -0
- package/src/components/I_Book.png +0 -0
- package/src/components/Item/Inventory/ItemContainer.tsx +70 -178
- package/src/components/Item/Inventory/ItemSlot.tsx +92 -24
- package/src/components/Item/Inventory/itemContainerHelper.ts +48 -11
- package/src/components/Item/SpriteFromAtlas.tsx +18 -1
- package/src/components/ListMenu.tsx +3 -3
- package/src/components/Multitab/Tab.tsx +57 -0
- package/src/components/Multitab/TabBody.tsx +13 -0
- package/src/components/Multitab/TabsContainer.tsx +97 -0
- package/src/components/SimpleProgressBar.tsx +14 -10
- package/src/components/SkillProgressBar.tsx +74 -20
- package/src/components/SkillsContainer.tsx +235 -0
- package/src/components/store/UI.store.ts +192 -0
- package/src/constants/uiColors.ts +7 -0
- package/src/index.tsx +1 -0
- package/src/mocks/atlas/items/items.json +4677 -189
- package/src/mocks/atlas/items/items.png +0 -0
- package/src/mocks/equipmentSet.mocks.ts +347 -0
- package/src/mocks/itemContainer.mocks.ts +33 -33
- package/src/mocks/skills.mocks.ts +116 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { SkillType } from '@rpg-engine/shared';
|
|
2
|
+
export declare const skillMock: {
|
|
3
|
+
_id: string;
|
|
4
|
+
stamina: {
|
|
5
|
+
type: SkillType;
|
|
6
|
+
level: number;
|
|
7
|
+
skillPoints: number;
|
|
8
|
+
skillPointsToNextLevel: number;
|
|
9
|
+
};
|
|
10
|
+
magic: {
|
|
11
|
+
type: SkillType;
|
|
12
|
+
level: number;
|
|
13
|
+
skillPoints: number;
|
|
14
|
+
skillPointsToNextLevel: number;
|
|
15
|
+
};
|
|
16
|
+
magicResistance: {
|
|
17
|
+
type: SkillType;
|
|
18
|
+
level: number;
|
|
19
|
+
skillPoints: number;
|
|
20
|
+
skillPointsToNextLevel: number;
|
|
21
|
+
};
|
|
22
|
+
strength: {
|
|
23
|
+
type: SkillType;
|
|
24
|
+
level: number;
|
|
25
|
+
skillPoints: number;
|
|
26
|
+
skillPointsToNextLevel: number;
|
|
27
|
+
};
|
|
28
|
+
resistance: {
|
|
29
|
+
type: SkillType;
|
|
30
|
+
level: number;
|
|
31
|
+
skillPoints: number;
|
|
32
|
+
skillPointsToNextLevel: number;
|
|
33
|
+
};
|
|
34
|
+
dexterity: {
|
|
35
|
+
type: SkillType;
|
|
36
|
+
level: number;
|
|
37
|
+
skillPoints: number;
|
|
38
|
+
skillPointsToNextLevel: number;
|
|
39
|
+
};
|
|
40
|
+
first: {
|
|
41
|
+
type: SkillType;
|
|
42
|
+
level: number;
|
|
43
|
+
skillPoints: number;
|
|
44
|
+
skillPointsToNextLevel: number;
|
|
45
|
+
};
|
|
46
|
+
club: {
|
|
47
|
+
type: SkillType;
|
|
48
|
+
level: number;
|
|
49
|
+
skillPoints: number;
|
|
50
|
+
skillPointsToNextLevel: number;
|
|
51
|
+
};
|
|
52
|
+
sword: {
|
|
53
|
+
type: SkillType;
|
|
54
|
+
level: number;
|
|
55
|
+
skillPoints: number;
|
|
56
|
+
skillPointsToNextLevel: number;
|
|
57
|
+
};
|
|
58
|
+
axe: {
|
|
59
|
+
type: SkillType;
|
|
60
|
+
level: number;
|
|
61
|
+
skillPoints: number;
|
|
62
|
+
skillPointsToNextLevel: number;
|
|
63
|
+
};
|
|
64
|
+
distance: {
|
|
65
|
+
type: SkillType;
|
|
66
|
+
level: number;
|
|
67
|
+
skillPoints: number;
|
|
68
|
+
skillPointsToNextLevel: number;
|
|
69
|
+
};
|
|
70
|
+
shielding: {
|
|
71
|
+
type: SkillType;
|
|
72
|
+
level: number;
|
|
73
|
+
skillPoints: number;
|
|
74
|
+
skillPointsToNextLevel: number;
|
|
75
|
+
};
|
|
76
|
+
fishing: {
|
|
77
|
+
type: SkillType;
|
|
78
|
+
level: number;
|
|
79
|
+
skillPoints: number;
|
|
80
|
+
skillPointsToNextLevel: number;
|
|
81
|
+
};
|
|
82
|
+
mining: {
|
|
83
|
+
type: SkillType;
|
|
84
|
+
level: number;
|
|
85
|
+
skillPoints: number;
|
|
86
|
+
skillPointsToNextLevel: number;
|
|
87
|
+
};
|
|
88
|
+
lumberjacking: {
|
|
89
|
+
type: SkillType;
|
|
90
|
+
level: number;
|
|
91
|
+
skillPoints: number;
|
|
92
|
+
skillPointsToNextLevel: number;
|
|
93
|
+
};
|
|
94
|
+
cooking: {
|
|
95
|
+
type: SkillType;
|
|
96
|
+
level: number;
|
|
97
|
+
skillPoints: number;
|
|
98
|
+
skillPointsToNextLevel: number;
|
|
99
|
+
};
|
|
100
|
+
alchemy: {
|
|
101
|
+
type: SkillType;
|
|
102
|
+
level: number;
|
|
103
|
+
skillPoints: number;
|
|
104
|
+
skillPointsToNextLevel: number;
|
|
105
|
+
};
|
|
106
|
+
level: number;
|
|
107
|
+
xpGainRate: number;
|
|
108
|
+
experience: number;
|
|
109
|
+
xpToNextLevel: number;
|
|
110
|
+
ownerType: string;
|
|
111
|
+
owner: string;
|
|
112
|
+
createdAt: string;
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
__v: number;
|
|
115
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.71",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -83,11 +83,13 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@rollup/plugin-image": "^2.1.1",
|
|
86
|
-
"@rpg-engine/shared": "^0.3.
|
|
86
|
+
"@rpg-engine/shared": "^0.3.39",
|
|
87
87
|
"dayjs": "^1.11.2",
|
|
88
|
+
"fs-extra": "^10.1.0",
|
|
89
|
+
"mobx": "^6.6.0",
|
|
90
|
+
"mobx-react": "^7.5.0",
|
|
88
91
|
"react-draggable": "^4.4.5",
|
|
89
92
|
"react-error-boundary": "^3.1.4",
|
|
90
|
-
"react-resizable": "^3.0.4",
|
|
91
93
|
"rollup-plugin-image-files": "^1.4.2",
|
|
92
94
|
"rpgui": "^1.0.3"
|
|
93
95
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IPosition } from '../../types/eventTypes';
|
|
3
|
+
import { DraggableContainer } from '../DraggableContainer';
|
|
4
|
+
import { RPGUIContainerTypes } from '../RPGUIContainer';
|
|
5
|
+
|
|
6
|
+
interface IProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
title: string;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
onPositionChange?: (position: IPosition) => void;
|
|
11
|
+
onOutsideClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const SlotsContainer: React.FC<IProps> = ({
|
|
15
|
+
children,
|
|
16
|
+
title,
|
|
17
|
+
onClose,
|
|
18
|
+
onPositionChange,
|
|
19
|
+
onOutsideClick,
|
|
20
|
+
}) => {
|
|
21
|
+
return (
|
|
22
|
+
<DraggableContainer
|
|
23
|
+
title={title}
|
|
24
|
+
type={RPGUIContainerTypes.Framed}
|
|
25
|
+
onCloseButton={() => {
|
|
26
|
+
if (onClose) {
|
|
27
|
+
onClose();
|
|
28
|
+
}
|
|
29
|
+
}}
|
|
30
|
+
width="330px"
|
|
31
|
+
cancelDrag=".item-container-body"
|
|
32
|
+
onPositionChange={({ x, y }) => {
|
|
33
|
+
if (onPositionChange) {
|
|
34
|
+
onPositionChange({ x, y });
|
|
35
|
+
}
|
|
36
|
+
}}
|
|
37
|
+
onOutsideClick={onOutsideClick}
|
|
38
|
+
>
|
|
39
|
+
{children}
|
|
40
|
+
</DraggableContainer>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import Draggable, { DraggableData } from 'react-draggable';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
+
import { useOutsideClick } from '../hooks/useOutsideAlerter';
|
|
4
5
|
import { IPosition } from '../types/eventTypes';
|
|
5
6
|
import { RPGUIContainerTypes } from './RPGUIContainer';
|
|
6
7
|
|
|
@@ -10,12 +11,13 @@ export interface IDraggableContainerProps {
|
|
|
10
11
|
height?: string;
|
|
11
12
|
className?: string;
|
|
12
13
|
type?: RPGUIContainerTypes;
|
|
13
|
-
title
|
|
14
|
+
title?: string;
|
|
14
15
|
imgSrc?: string;
|
|
15
16
|
imgWidth?: string;
|
|
16
|
-
onCloseButton
|
|
17
|
+
onCloseButton?: () => void;
|
|
17
18
|
cancelDrag?: string;
|
|
18
19
|
onPositionChange?: (position: IPosition) => void;
|
|
20
|
+
onOutsideClick?: () => void;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
|
|
@@ -30,43 +32,68 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
|
|
|
30
32
|
imgWidth = '20px',
|
|
31
33
|
cancelDrag,
|
|
32
34
|
onPositionChange,
|
|
35
|
+
onOutsideClick,
|
|
33
36
|
}) => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const draggableRef = useRef(null);
|
|
38
|
+
|
|
39
|
+
useOutsideClick(draggableRef, 'item-container');
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
document.addEventListener('clickOutside', event => {
|
|
43
|
+
const e = event as CustomEvent;
|
|
44
|
+
|
|
45
|
+
if (e.detail.id === 'item-container') {
|
|
46
|
+
if (onOutsideClick) {
|
|
47
|
+
onOutsideClick();
|
|
43
48
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return () => {
|
|
53
|
+
document.removeEventListener('clickOutside', _e => {});
|
|
54
|
+
};
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<div ref={draggableRef}>
|
|
59
|
+
<Draggable
|
|
60
|
+
cancel={`.container-close,${cancelDrag}`}
|
|
61
|
+
onDrag={(_e, data: DraggableData) => {
|
|
62
|
+
if (onPositionChange) {
|
|
63
|
+
onPositionChange({
|
|
64
|
+
x: data.x,
|
|
65
|
+
y: data.y,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}}
|
|
50
69
|
>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
<Container
|
|
71
|
+
width={width}
|
|
72
|
+
height={height || 'auto'}
|
|
73
|
+
className={`rpgui-container ${type} ${className}`}
|
|
74
|
+
>
|
|
75
|
+
{title && (
|
|
76
|
+
<TitleContainer className="drag-handler">
|
|
77
|
+
<Title>
|
|
78
|
+
{imgSrc && <Icon src={imgSrc} width={imgWidth} />}
|
|
79
|
+
{title}
|
|
80
|
+
</Title>
|
|
81
|
+
</TitleContainer>
|
|
82
|
+
)}
|
|
83
|
+
{onCloseButton && (
|
|
84
|
+
<CloseButton
|
|
85
|
+
className="container-close"
|
|
86
|
+
onClick={onCloseButton}
|
|
87
|
+
onTouchStart={onCloseButton}
|
|
88
|
+
>
|
|
89
|
+
X
|
|
90
|
+
</CloseButton>
|
|
91
|
+
)}
|
|
92
|
+
|
|
93
|
+
{children}
|
|
94
|
+
</Container>
|
|
95
|
+
</Draggable>
|
|
96
|
+
</div>
|
|
70
97
|
);
|
|
71
98
|
};
|
|
72
99
|
|
|
@@ -101,7 +128,7 @@ const TitleContainer = styled.div`
|
|
|
101
128
|
height: 100%;
|
|
102
129
|
display: flex;
|
|
103
130
|
flex-wrap: wrap;
|
|
104
|
-
justify-content:
|
|
131
|
+
justify-content: flex-start;
|
|
105
132
|
align-items: center;
|
|
106
133
|
`;
|
|
107
134
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IEquipementSet,
|
|
3
|
+
IItem,
|
|
4
|
+
IItemContainer,
|
|
5
|
+
ItemSlotType,
|
|
6
|
+
ItemSocketEvents,
|
|
7
|
+
} from '@rpg-engine/shared';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
import React, { useState } from 'react';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
import { IPosition } from '../../types/eventTypes';
|
|
12
|
+
import { DraggableContainer } from '../DraggableContainer';
|
|
13
|
+
import { ItemCard } from '../Item/Cards/ItemCard';
|
|
14
|
+
import { ItemSlot, SlotContainerType } from '../Item/Inventory/ItemSlot';
|
|
15
|
+
import { ListMenu } from '../ListMenu';
|
|
16
|
+
import { RPGUIContainerTypes } from '../RPGUIContainer';
|
|
17
|
+
import { uiStore } from '../store/UI.store';
|
|
18
|
+
|
|
19
|
+
export interface IEquipmentSetProps {
|
|
20
|
+
equipmentSet: IEquipementSet;
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
|
|
23
|
+
onActionSelected?: (payload: any) => void;
|
|
24
|
+
initialPosition?: { x: number; y: number };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const EquipmentSet: React.FC<IEquipmentSetProps> = observer(
|
|
28
|
+
({
|
|
29
|
+
equipmentSet,
|
|
30
|
+
onClose,
|
|
31
|
+
onMouseOver,
|
|
32
|
+
onActionSelected,
|
|
33
|
+
initialPosition = { x: 0, y: 0 },
|
|
34
|
+
}) => {
|
|
35
|
+
const {
|
|
36
|
+
neck,
|
|
37
|
+
leftHand,
|
|
38
|
+
ring,
|
|
39
|
+
head,
|
|
40
|
+
armor,
|
|
41
|
+
legs,
|
|
42
|
+
boot,
|
|
43
|
+
inventory,
|
|
44
|
+
rightHand,
|
|
45
|
+
accessory,
|
|
46
|
+
} = equipmentSet;
|
|
47
|
+
|
|
48
|
+
const equipmentData = [
|
|
49
|
+
neck,
|
|
50
|
+
leftHand,
|
|
51
|
+
ring,
|
|
52
|
+
head,
|
|
53
|
+
armor,
|
|
54
|
+
legs,
|
|
55
|
+
boot,
|
|
56
|
+
inventory,
|
|
57
|
+
rightHand,
|
|
58
|
+
accessory,
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const equipmentMaskSlots = [
|
|
62
|
+
ItemSlotType.Neck,
|
|
63
|
+
ItemSlotType.LeftHand,
|
|
64
|
+
ItemSlotType.Ring,
|
|
65
|
+
ItemSlotType.Head,
|
|
66
|
+
ItemSlotType.Torso,
|
|
67
|
+
ItemSlotType.Legs,
|
|
68
|
+
ItemSlotType.Feet,
|
|
69
|
+
ItemSlotType.Inventory,
|
|
70
|
+
ItemSlotType.RightHand,
|
|
71
|
+
ItemSlotType.Accessory,
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
// we use this draggable position to offset the menu position, after the container is dragged (otherwise, it bugs!)
|
|
75
|
+
const [draggablePosition, setDraggablePosition] = useState<IPosition>(
|
|
76
|
+
initialPosition
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const handleOnMouseHover = (
|
|
80
|
+
event: any,
|
|
81
|
+
slotIndex: number,
|
|
82
|
+
item: IItem | null,
|
|
83
|
+
x: number,
|
|
84
|
+
y: number
|
|
85
|
+
) => {
|
|
86
|
+
uiStore.handleOnMouseHover(event, slotIndex, item, x, y, onMouseOver);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const onSelected = (selectedActionId: ItemSocketEvents | string): void => {
|
|
90
|
+
uiStore.onSelected(selectedActionId, onActionSelected);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const onRenderEquipmentSlotRange = (start: number, end: number) => {
|
|
94
|
+
const equipmentRange = equipmentData.slice(start, end);
|
|
95
|
+
const slotMaksRange = equipmentMaskSlots.slice(start, end);
|
|
96
|
+
|
|
97
|
+
return equipmentRange.map((data, i) => {
|
|
98
|
+
const item = data as IItem;
|
|
99
|
+
const itemContainer =
|
|
100
|
+
(item && (item.itemContainer as IItemContainer)) ?? null;
|
|
101
|
+
return (
|
|
102
|
+
<ItemSlot
|
|
103
|
+
key={i}
|
|
104
|
+
slotIndex={i}
|
|
105
|
+
item={item}
|
|
106
|
+
itemContainer={itemContainer}
|
|
107
|
+
slotContainerType={SlotContainerType.EQUIPMENT_SET}
|
|
108
|
+
slotSpriteMask={slotMaksRange[i]}
|
|
109
|
+
onMouseOver={handleOnMouseHover}
|
|
110
|
+
onMouseOut={() => {
|
|
111
|
+
uiStore.clearItemHoverDetail();
|
|
112
|
+
}}
|
|
113
|
+
onClick={uiStore.handleOnItemClick}
|
|
114
|
+
onCancelContextMenu={() => {
|
|
115
|
+
uiStore.clearContextMenu();
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<DraggableContainer
|
|
124
|
+
title={'Equipments'}
|
|
125
|
+
type={RPGUIContainerTypes.Framed}
|
|
126
|
+
onCloseButton={() => {
|
|
127
|
+
if (onClose) onClose();
|
|
128
|
+
}}
|
|
129
|
+
width="330px"
|
|
130
|
+
cancelDrag=".equipment-container-body"
|
|
131
|
+
onPositionChange={({ x, y }) => {
|
|
132
|
+
setDraggablePosition({ x, y });
|
|
133
|
+
}}
|
|
134
|
+
onOutsideClick={() => {
|
|
135
|
+
uiStore.clearContextMenu();
|
|
136
|
+
uiStore.clearItemHoverDetail();
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<EquipmentSetContainer className="equipment-container-body">
|
|
140
|
+
<EquipmentColumn>{onRenderEquipmentSlotRange(0, 3)}</EquipmentColumn>
|
|
141
|
+
<EquipmentColumn>{onRenderEquipmentSlotRange(3, 7)}</EquipmentColumn>
|
|
142
|
+
<EquipmentColumn>{onRenderEquipmentSlotRange(7, 10)}</EquipmentColumn>
|
|
143
|
+
</EquipmentSetContainer>
|
|
144
|
+
|
|
145
|
+
{uiStore.contextMenu?.visible ? (
|
|
146
|
+
<ListMenu
|
|
147
|
+
x={uiStore.contextMenu.posX - draggablePosition.x}
|
|
148
|
+
y={uiStore.contextMenu.posY - draggablePosition.y}
|
|
149
|
+
options={uiStore.contextMenu.contextActions}
|
|
150
|
+
onSelected={onSelected}
|
|
151
|
+
/>
|
|
152
|
+
) : null}
|
|
153
|
+
|
|
154
|
+
{uiStore.onHoverDetail?.visible ? (
|
|
155
|
+
<ItemCard
|
|
156
|
+
item={uiStore.onHoverDetail.item}
|
|
157
|
+
x={uiStore.onHoverDetail.posX - draggablePosition.x}
|
|
158
|
+
y={uiStore.onHoverDetail.posY - draggablePosition.y}
|
|
159
|
+
/>
|
|
160
|
+
) : null}
|
|
161
|
+
</DraggableContainer>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
const EquipmentSetContainer = styled.div`
|
|
167
|
+
width: inherit;
|
|
168
|
+
display: flex;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
flex-wrap: wrap;
|
|
171
|
+
flex-direction: row;
|
|
172
|
+
`;
|
|
173
|
+
|
|
174
|
+
const EquipmentColumn = styled.div`
|
|
175
|
+
display: flex;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
flex-wrap: wrap;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
`;
|
|
Binary file
|