@rpg-engine/long-bow 0.3.79 → 0.3.81

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.
Files changed (34) hide show
  1. package/dist/components/Abstractions/ModalPortal.d.ts +6 -0
  2. package/dist/components/Abstractions/SlotsContainer.d.ts +1 -0
  3. package/dist/components/DraggableContainer.d.ts +1 -0
  4. package/dist/components/Equipment/EquipmentSet.d.ts +1 -1
  5. package/dist/components/Item/Inventory/ItemContainer.d.ts +1 -1
  6. package/dist/components/QuestInfo/QuestInfo.d.ts +1 -0
  7. package/dist/components/QuestList.d.ts +1 -0
  8. package/dist/components/SkillsContainer.d.ts +1 -0
  9. package/dist/components/Spellbook/Spellbook.d.ts +1 -0
  10. package/dist/components/TimeWidget/TimeWidget.d.ts +1 -0
  11. package/dist/long-bow.cjs.development.js +105 -89
  12. package/dist/long-bow.cjs.development.js.map +1 -1
  13. package/dist/long-bow.cjs.production.min.js +1 -1
  14. package/dist/long-bow.cjs.production.min.js.map +1 -1
  15. package/dist/long-bow.esm.js +105 -89
  16. package/dist/long-bow.esm.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/components/Abstractions/ModalPortal.tsx +22 -0
  19. package/src/components/Abstractions/SlotsContainer.tsx +3 -0
  20. package/src/components/CraftBook/CraftBook.tsx +1 -0
  21. package/src/components/DraggableContainer.tsx +3 -0
  22. package/src/components/Equipment/EquipmentSet.tsx +4 -3
  23. package/src/components/Item/Cards/ItemInfo.tsx +1 -1
  24. package/src/components/Item/Cards/ItemTooltip.tsx +20 -22
  25. package/src/components/Item/Cards/MobileItemTooltip.tsx +70 -55
  26. package/src/components/Item/Inventory/ItemContainer.tsx +28 -24
  27. package/src/components/Item/Inventory/ItemSlot.tsx +3 -1
  28. package/src/components/QuestInfo/QuestInfo.tsx +3 -0
  29. package/src/components/QuestList.tsx +7 -1
  30. package/src/components/SkillsContainer.tsx +7 -1
  31. package/src/components/Spellbook/Spellbook.tsx +3 -0
  32. package/src/components/TimeWidget/TimeWidget.tsx +3 -1
  33. package/src/components/TradingMenu/TradingMenu.tsx +1 -0
  34. package/src/mocks/itemContainer.mocks.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.3.79",
3
+ "version": "0.3.81",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import styled from 'styled-components';
4
+
5
+ const modalRoot = document.getElementById('modal-root')!;
6
+
7
+ interface ModalPortalProps {
8
+ children: React.ReactNode;
9
+ }
10
+
11
+ const ModalPortal: React.FC<ModalPortalProps> = ({ children }) => {
12
+ return ReactDOM.createPortal(
13
+ <Container className="rpgui-content">{children}</Container>,
14
+ modalRoot
15
+ );
16
+ };
17
+
18
+ const Container = styled.div`
19
+ position: static !important;
20
+ `;
21
+
22
+ export default ModalPortal;
@@ -10,6 +10,7 @@ interface IProps {
10
10
  onPositionChange?: (position: IPosition) => void;
11
11
  onOutsideClick?: () => void;
12
12
  initialPosition?: IPosition;
13
+ scale?: number;
13
14
  }
14
15
 
15
16
  export const SlotsContainer: React.FC<IProps> = ({
@@ -19,6 +20,7 @@ export const SlotsContainer: React.FC<IProps> = ({
19
20
  onPositionChange,
20
21
  onOutsideClick,
21
22
  initialPosition,
23
+ scale,
22
24
  }) => {
23
25
  return (
24
26
  <DraggableContainer
@@ -38,6 +40,7 @@ export const SlotsContainer: React.FC<IProps> = ({
38
40
  }}
39
41
  onOutsideClick={onOutsideClick}
40
42
  initialPosition={initialPosition}
43
+ scale={scale}
41
44
  >
42
45
  {children}
43
46
  </DraggableContainer>
@@ -93,6 +93,7 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
93
93
  onClose();
94
94
  }
95
95
  }}
96
+ scale={scale}
96
97
  >
97
98
  <div style={{ width: '100%' }}>
98
99
  <Title>Craftbook</Title>
@@ -20,6 +20,7 @@ export interface IDraggableContainerProps {
20
20
  onPositionChange?: (position: IPosition) => void;
21
21
  onOutsideClick?: () => void;
22
22
  initialPosition?: IPosition;
23
+ scale?: number;
23
24
  }
24
25
 
25
26
  export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
@@ -36,6 +37,7 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
36
37
  onPositionChange,
37
38
  onOutsideClick,
38
39
  initialPosition = { x: 0, y: 0 },
40
+ scale,
39
41
  }) => {
40
42
  const draggableRef = useRef(null);
41
43
 
@@ -69,6 +71,7 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
69
71
  }
70
72
  }}
71
73
  defaultPosition={initialPosition}
74
+ scale={scale}
72
75
  >
73
76
  <Container
74
77
  ref={draggableRef}
@@ -33,7 +33,7 @@ export interface IEquipmentSetProps {
33
33
  itemContainerType: ItemContainerType | null
34
34
  ) => void;
35
35
  onItemOutsideDrop?: (item: IItem, position: IPosition) => void;
36
- dragScale?: number;
36
+ scale?: number;
37
37
  checkIfItemCanBeMoved: () => boolean;
38
38
  checkIfItemShouldDragEnd?: () => boolean;
39
39
  onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
@@ -58,7 +58,7 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
58
58
  onItemOutsideDrop,
59
59
  checkIfItemCanBeMoved,
60
60
  checkIfItemShouldDragEnd,
61
- dragScale,
61
+ scale,
62
62
  }) => {
63
63
  const {
64
64
  neck,
@@ -136,7 +136,7 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
136
136
  onDragEnd={quantity => {
137
137
  if (onItemDragEnd) onItemDragEnd(quantity);
138
138
  }}
139
- dragScale={dragScale}
139
+ dragScale={scale}
140
140
  checkIfItemCanBeMoved={checkIfItemCanBeMoved}
141
141
  checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}
142
142
  onPlaceDrop={(item, slotIndex, itemContainerType) => {
@@ -162,6 +162,7 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
162
162
  }}
163
163
  width="330px"
164
164
  cancelDrag=".equipment-container-body"
165
+ scale={scale}
165
166
  >
166
167
  <EquipmentSetContainer className="equipment-container-body">
167
168
  <EquipmentColumn>{onRenderEquipmentSlotRange(0, 3)}</EquipmentColumn>
@@ -137,7 +137,7 @@ export const ItemInfo: React.FC<IItemInfoProps> = ({
137
137
 
138
138
  {item.maxStackSize && item.maxStackSize !== 1 && (
139
139
  <StackInfo>
140
- x{item.stackQty ?? 1}({item.maxStackSize})
140
+ x{Math.round((item.stackQty ?? 1) * 100) / 100}({item.maxStackSize})
141
141
  </StackInfo>
142
142
  )}
143
143
 
@@ -1,6 +1,7 @@
1
1
  import { IEquipmentSet, IItem } from '@rpg-engine/shared';
2
2
  import React, { useEffect, useRef } from 'react';
3
3
  import styled from 'styled-components';
4
+ import ModalPortal from '../../Abstractions/ModalPortal';
4
5
  import { ItemInfoDisplay } from './ItemInfoDisplay';
5
6
 
6
7
  export interface IItemTooltipProps {
@@ -22,7 +23,6 @@ export const ItemTooltip: React.FC<IItemTooltipProps> = ({
22
23
 
23
24
  useEffect(() => {
24
25
  const { current } = ref;
25
- let initialOffset: DOMRect;
26
26
 
27
27
  if (current) {
28
28
  const handleMouseMove = (event: MouseEvent) => {
@@ -30,9 +30,6 @@ export const ItemTooltip: React.FC<IItemTooltipProps> = ({
30
30
 
31
31
  // Adjust the position of the tooltip based on the mouse position
32
32
  const rect = current.getBoundingClientRect();
33
- if (!initialOffset) {
34
- initialOffset = rect;
35
- }
36
33
 
37
34
  const tooltipWidth = rect.width;
38
35
  const tooltipHeight = rect.height;
@@ -40,14 +37,12 @@ export const ItemTooltip: React.FC<IItemTooltipProps> = ({
40
37
  clientX + tooltipWidth + offset > window.innerWidth;
41
38
  const isOffScreenBottom =
42
39
  clientY + tooltipHeight + offset > window.innerHeight;
43
- const x =
44
- (isOffScreenRight
45
- ? clientX - tooltipWidth - offset
46
- : clientX + offset) - initialOffset.x;
47
- const y =
48
- (isOffScreenBottom
49
- ? clientY - tooltipHeight - offset
50
- : clientY + offset) - initialOffset.y;
40
+ const x = isOffScreenRight
41
+ ? clientX - tooltipWidth - offset
42
+ : clientX + offset;
43
+ const y = isOffScreenBottom
44
+ ? clientY - tooltipHeight - offset
45
+ : clientY + offset;
51
46
 
52
47
  current.style.transform = `translate(${x}px, ${y}px)`;
53
48
  current.style.opacity = '1';
@@ -64,22 +59,25 @@ export const ItemTooltip: React.FC<IItemTooltipProps> = ({
64
59
  }, []);
65
60
 
66
61
  return (
67
- <Container ref={ref}>
68
- <ItemInfoDisplay
69
- item={item}
70
- atlasIMG={atlasIMG}
71
- atlasJSON={atlasJSON}
72
- equipmentSet={equipmentSet}
73
- />
74
- </Container>
62
+ <ModalPortal>
63
+ <Container ref={ref}>
64
+ <ItemInfoDisplay
65
+ item={item}
66
+ atlasIMG={atlasIMG}
67
+ atlasJSON={atlasJSON}
68
+ equipmentSet={equipmentSet}
69
+ />
70
+ </Container>
71
+ </ModalPortal>
75
72
  );
76
73
  };
77
74
 
78
75
  const Container = styled.div`
79
- position: fixed;
80
- z-index: 50;
76
+ position: absolute;
77
+ z-index: 100;
81
78
  pointer-events: none;
82
79
  left: 0;
83
80
  top: 0;
84
81
  opacity: 0;
82
+ transition: opacity 0.08s;
85
83
  `;
@@ -1,6 +1,7 @@
1
1
  import { IEquipmentSet, IItem } from '@rpg-engine/shared';
2
- import React, { useEffect, useRef } from 'react';
2
+ import React, { useRef } from 'react';
3
3
  import styled from 'styled-components';
4
+ import ModalPortal from '../../Abstractions/ModalPortal';
4
5
  import { ItemInfoDisplay } from './ItemInfoDisplay';
5
6
 
6
7
  interface IListMenuOption {
@@ -31,72 +32,86 @@ export const MobileItemTooltip: React.FC<MobileItemTooltipProps> = ({
31
32
  }) => {
32
33
  const ref = useRef<HTMLDivElement>(null);
33
34
 
34
- useEffect(() => {
35
- const { current } = ref;
36
-
37
- if (current) {
38
- // Adjust the position to be on whole window
39
- const rect = current.getBoundingClientRect();
40
-
41
- const x = (-rect.x * 100) / (scale * 100);
42
- const y = (-rect.y * 100) / (scale * 100);
43
-
44
- current.style.transform = `translate(${x}px, ${y}px)`;
45
- current.style.opacity = '0.92';
46
- }
47
-
48
- return;
49
- }, []);
35
+ const handleFadeOut = () => {
36
+ ref.current?.classList.add('fadeOut');
37
+ };
50
38
 
51
39
  return (
52
- <Container
53
- ref={ref}
54
- onTouchEnd={() => {
55
- setTimeout(() => {
56
- closeTooltip();
57
- }, 10);
58
- }}
59
- scale={scale}
60
- >
61
- <ItemInfoDisplay
62
- item={item}
63
- atlasIMG={atlasIMG}
64
- atlasJSON={atlasJSON}
65
- equipmentSet={equipmentSet}
66
- isMobile
67
- />
68
- <OptionsContainer>
69
- {options?.map(option => (
70
- <Option
71
- key={option.id}
72
- onTouchEnd={() => {
73
- setTimeout(() => {
74
- onSelected?.(option.id);
75
- closeTooltip();
76
- }, 10);
77
- }}
78
- >
79
- {option.text}
80
- </Option>
81
- ))}
82
- </OptionsContainer>
83
- </Container>
40
+ <ModalPortal>
41
+ <Container
42
+ ref={ref}
43
+ onTouchEnd={() => {
44
+ handleFadeOut();
45
+ setTimeout(() => {
46
+ closeTooltip();
47
+ }, 100);
48
+ }}
49
+ scale={scale}
50
+ >
51
+ <ItemInfoDisplay
52
+ item={item}
53
+ atlasIMG={atlasIMG}
54
+ atlasJSON={atlasJSON}
55
+ equipmentSet={equipmentSet}
56
+ isMobile
57
+ />
58
+ <OptionsContainer>
59
+ {options?.map(option => (
60
+ <Option
61
+ key={option.id}
62
+ onTouchEnd={() => {
63
+ handleFadeOut();
64
+ setTimeout(() => {
65
+ onSelected?.(option.id);
66
+ closeTooltip();
67
+ }, 100);
68
+ }}
69
+ >
70
+ {option.text}
71
+ </Option>
72
+ ))}
73
+ </OptionsContainer>
74
+ </Container>
75
+ </ModalPortal>
84
76
  );
85
77
  };
86
78
 
87
79
  const Container = styled.div<{ scale: number }>`
88
- position: fixed;
89
- z-index: 50;
80
+ position: absolute;
81
+ z-index: 100;
90
82
  left: 0;
91
83
  top: 0;
92
- opacity: 0;
93
- width: ${({ scale }) => `calc(100vw * 100 / ${scale * 100})`};
94
- height: ${({ scale }) => `calc(100vh * 100 / ${scale * 100})`};
84
+ width: 100vw;
85
+ height: 100vh;
95
86
  background-color: rgba(0 0 0 / 0.5);
96
87
  display: flex;
97
88
  justify-content: center;
98
89
  align-items: center;
99
90
  gap: 0.5rem;
91
+ transition: opacity 0.08s;
92
+ animation: fadeIn 0.1s forwards;
93
+
94
+ @keyframes fadeIn {
95
+ 0% {
96
+ opacity: 0;
97
+ }
98
+ 100% {
99
+ opacity: 0.92;
100
+ }
101
+ }
102
+
103
+ @keyframes fadeOut {
104
+ 0% {
105
+ opacity: 0.92;
106
+ }
107
+ 100% {
108
+ opacity: 0;
109
+ }
110
+ }
111
+
112
+ &.fadeOut {
113
+ animation: fadeOut 0.1s forwards;
114
+ }
100
115
 
101
116
  @media (max-width: 580px) {
102
117
  flex-direction: column;
@@ -122,7 +137,7 @@ const Option = styled.button`
122
137
  border: none;
123
138
  border-radius: 3px;
124
139
  width: 8rem;
125
- transition: background-color 0.2s;
140
+ transition: background-color 0.1s;
126
141
 
127
142
  &:hover {
128
143
  background-color: #555;
@@ -12,6 +12,7 @@ import { SlotsContainer } from '../../Abstractions/SlotsContainer';
12
12
  import { ItemQuantitySelector } from './ItemQuantitySelector';
13
13
 
14
14
  import { IPosition } from '../../../types/eventTypes';
15
+ import ModalPortal from '../../Abstractions/ModalPortal';
15
16
  import { ShortcutsSetter } from '../../Shortcuts/ShortcutsSetter';
16
17
  import { ItemSlot } from './ItemSlot';
17
18
 
@@ -35,7 +36,7 @@ export interface IItemContainerProps {
35
36
  slotIndex: number,
36
37
  itemContainerType: ItemContainerType | null
37
38
  ) => void;
38
- dragScale?: number;
39
+ scale?: number;
39
40
  checkIfItemCanBeMoved: () => boolean;
40
41
  checkIfItemShouldDragEnd?: () => boolean;
41
42
  onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
@@ -68,7 +69,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
68
69
  checkIfItemCanBeMoved,
69
70
  initialPosition,
70
71
  checkIfItemShouldDragEnd,
71
- dragScale,
72
+ scale,
72
73
  shortcuts,
73
74
  setItemShortcut,
74
75
  removeShortcut,
@@ -117,7 +118,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
117
118
  onDragEnd={quantity => {
118
119
  if (onItemDragEnd) onItemDragEnd(quantity);
119
120
  }}
120
- dragScale={dragScale}
121
+ dragScale={scale}
121
122
  checkIfItemCanBeMoved={checkIfItemCanBeMoved}
122
123
  checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}
123
124
  openQuantitySelector={(maxQuantity, callback) => {
@@ -150,6 +151,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
150
151
  title={itemContainer.name || 'Container'}
151
152
  onClose={onClose}
152
153
  initialPosition={initialPosition}
154
+ scale={scale}
153
155
  >
154
156
  {type === ItemContainerType.Inventory &&
155
157
  shortcuts &&
@@ -168,27 +170,29 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
168
170
  </ItemsContainer>
169
171
  </SlotsContainer>
170
172
  {quantitySelect.isOpen && (
171
- <QuantitySelectorContainer>
172
- <ItemQuantitySelector
173
- quantity={quantitySelect.maxQuantity}
174
- onConfirm={quantity => {
175
- quantitySelect.callback(quantity);
176
- setQuantitySelect({
177
- isOpen: false,
178
- maxQuantity: 1,
179
- callback: () => {},
180
- });
181
- }}
182
- onClose={() => {
183
- quantitySelect.callback(-1);
184
- setQuantitySelect({
185
- isOpen: false,
186
- maxQuantity: 1,
187
- callback: () => {},
188
- });
189
- }}
190
- />
191
- </QuantitySelectorContainer>
173
+ <ModalPortal>
174
+ <QuantitySelectorContainer>
175
+ <ItemQuantitySelector
176
+ quantity={quantitySelect.maxQuantity}
177
+ onConfirm={quantity => {
178
+ quantitySelect.callback(quantity);
179
+ setQuantitySelect({
180
+ isOpen: false,
181
+ maxQuantity: 1,
182
+ callback: () => {},
183
+ });
184
+ }}
185
+ onClose={() => {
186
+ quantitySelect.callback(-1);
187
+ setQuantitySelect({
188
+ isOpen: false,
189
+ maxQuantity: 1,
190
+ callback: () => {},
191
+ });
192
+ }}
193
+ />
194
+ </QuantitySelectorContainer>
195
+ </ModalPortal>
192
196
  )}
193
197
  </>
194
198
  );
@@ -146,7 +146,9 @@ export const ItemSlot: React.FC<IProps> = observer(
146
146
  return (
147
147
  <ItemQtyContainer key={`qty-${itemId}`}>
148
148
  <Ellipsis maxLines={1} maxWidth="48px">
149
- <ItemQty className={qtyClassName}> {stackQty} </ItemQty>
149
+ <ItemQty className={qtyClassName}>
150
+ {Math.round(stackQty * 100) / 100}{' '}
151
+ </ItemQty>
150
152
  </Ellipsis>
151
153
  </ItemQtyContainer>
152
154
  );
@@ -22,6 +22,7 @@ export interface IQuestInfoProps {
22
22
  buttons?: IQuestsButtonProps[];
23
23
  quests: IQuest[];
24
24
  onChangeQuest: (currentQuestIndex: number, currentQuestId: string) => void;
25
+ scale?: number;
25
26
  }
26
27
 
27
28
  export const QuestInfo: React.FC<IQuestInfoProps> = ({
@@ -29,6 +30,7 @@ export const QuestInfo: React.FC<IQuestInfoProps> = ({
29
30
  onClose,
30
31
  buttons,
31
32
  onChangeQuest,
33
+ scale,
32
34
  }) => {
33
35
  const [currentIndex, setCurrentIndex] = useState(0);
34
36
  const questsLength = quests.length - 1;
@@ -56,6 +58,7 @@ export const QuestInfo: React.FC<IQuestInfoProps> = ({
56
58
  }}
57
59
  width="730px"
58
60
  cancelDrag=".equipment-container-body .arrow-selector"
61
+ scale={scale}
59
62
  >
60
63
  {quests.length >= 2 ? (
61
64
  <QuestsContainer>
@@ -8,9 +8,14 @@ import { RPGUIContainerTypes } from './RPGUIContainer';
8
8
  export interface IQuestListProps {
9
9
  quests?: IQuest[];
10
10
  onClose: () => void;
11
+ scale?: number;
11
12
  }
12
13
 
13
- export const QuestList: React.FC<IQuestListProps> = ({ quests, onClose }) => {
14
+ export const QuestList: React.FC<IQuestListProps> = ({
15
+ quests,
16
+ onClose,
17
+ scale,
18
+ }) => {
14
19
  return (
15
20
  <QuestDraggableContainer
16
21
  type={RPGUIContainerTypes.Framed}
@@ -18,6 +23,7 @@ export const QuestList: React.FC<IQuestListProps> = ({ quests, onClose }) => {
18
23
  if (onClose) onClose();
19
24
  }}
20
25
  width="520px"
26
+ scale={scale}
21
27
  >
22
28
  <div style={{ width: '100%' }}>
23
29
  <Title>Quests</Title>
@@ -10,6 +10,7 @@ export interface ISkillContainerProps {
10
10
  onCloseButton: () => void;
11
11
  atlasJSON: any;
12
12
  atlasIMG: any;
13
+ scale?: number;
13
14
  }
14
15
 
15
16
  const skillProps = {
@@ -80,6 +81,7 @@ export const SkillsContainer: React.FC<ISkillContainerProps> = ({
80
81
  skill,
81
82
  atlasIMG,
82
83
  atlasJSON,
84
+ scale,
83
85
  }) => {
84
86
  const onRenderSkillCategory = (
85
87
  category: 'attributes' | 'combat' | 'crafting'
@@ -115,7 +117,11 @@ export const SkillsContainer: React.FC<ISkillContainerProps> = ({
115
117
  };
116
118
 
117
119
  return (
118
- <SkillsDraggableContainer title="Skills" cancelDrag="#skillsDiv">
120
+ <SkillsDraggableContainer
121
+ title="Skills"
122
+ cancelDrag="#skillsDiv"
123
+ scale={scale}
124
+ >
119
125
  {onCloseButton && (
120
126
  <CloseButton onPointerDown={onCloseButton}>X</CloseButton>
121
127
  )}
@@ -21,6 +21,7 @@ export interface ISpellbookProps {
21
21
  removeShortcut: (index: number) => void;
22
22
  atlasIMG: any;
23
23
  atlasJSON: any;
24
+ scale?: number;
24
25
  }
25
26
 
26
27
  export const Spellbook: React.FC<ISpellbookProps> = ({
@@ -36,6 +37,7 @@ export const Spellbook: React.FC<ISpellbookProps> = ({
36
37
  removeShortcut,
37
38
  atlasIMG,
38
39
  atlasJSON,
40
+ scale,
39
41
  }) => {
40
42
  const [search, setSearch] = useState('');
41
43
  const [settingShortcutIndex, setSettingShortcutIndex] = useState(-1);
@@ -82,6 +84,7 @@ export const Spellbook: React.FC<ISpellbookProps> = ({
82
84
  width="inherit"
83
85
  height="inherit"
84
86
  cancelDrag="#spellbook-search, #shortcuts_list, .spell"
87
+ scale={scale}
85
88
  >
86
89
  <Container>
87
90
  <Title>Learned Spells</Title>
@@ -11,15 +11,17 @@ export interface IClockWidgetProps {
11
11
  onClose?: () => void;
12
12
  TimeClock: string;
13
13
  periodOfDay: PeriodOfDay;
14
+ scale?: number;
14
15
  }
15
16
 
16
17
  export const TimeWidget: React.FC<IClockWidgetProps> = ({
17
18
  onClose,
18
19
  TimeClock,
19
20
  periodOfDay,
21
+ scale,
20
22
  }) => {
21
23
  return (
22
- <Draggable>
24
+ <Draggable scale={scale}>
23
25
  <WidgetContainer>
24
26
  <CloseButton onPointerDown={onClose}>X</CloseButton>
25
27
  <DayNightContainer>
@@ -92,6 +92,7 @@ export const TradingMenu: React.FC<ITradingMenu> = ({
92
92
  }}
93
93
  width="600px"
94
94
  cancelDrag="#TraderContainer"
95
+ scale={scale}
95
96
  >
96
97
  <>
97
98
  <div style={{ width: '100%' }}>
@@ -470,7 +470,7 @@ export const items: IItem[] = [
470
470
  isEquipable: true,
471
471
  isStackable: true,
472
472
  maxStackSize: 100,
473
- stackQty: 203.23,
473
+ stackQty: 203.200000000000008,
474
474
  isUsable: false,
475
475
  isStorable: true,
476
476
  isTwoHanded: false,