@rpg-engine/long-bow 0.1.73 → 0.1.76

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.1.73",
3
+ "version": "0.1.76",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "dependencies": {
85
85
  "@rollup/plugin-image": "^2.1.1",
86
- "@rpg-engine/shared": "^0.3.39",
86
+ "@rpg-engine/shared": "^0.3.40",
87
87
  "dayjs": "^1.11.2",
88
88
  "fs-extra": "^10.1.0",
89
89
  "mobx": "^6.6.0",
@@ -55,45 +55,44 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
55
55
  }, []);
56
56
 
57
57
  return (
58
- <DraggableRef 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
- }}
58
+ <Draggable
59
+ cancel={`.container-close,${cancelDrag}`}
60
+ onDrag={(_e, data: DraggableData) => {
61
+ if (onPositionChange) {
62
+ onPositionChange({
63
+ x: data.x,
64
+ y: data.y,
65
+ });
66
+ }
67
+ }}
68
+ >
69
+ <Container
70
+ ref={draggableRef}
71
+ width={width}
72
+ height={height || 'auto'}
73
+ className={`rpgui-container ${type} ${className}`}
69
74
  >
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
- </DraggableRef>
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>
97
96
  );
98
97
  };
99
98
 
@@ -102,14 +101,6 @@ interface IContainerProps {
102
101
  height: string;
103
102
  }
104
103
 
105
- const DraggableRef = styled.div`
106
- width: 100%;
107
- height: 100%;
108
- display: flex;
109
- justify-content: center;
110
- align-items: center;
111
- `;
112
-
113
104
  const Container = styled.div<IContainerProps>`
114
105
  height: ${props => props.height};
115
106
  width: ${({ width }) => width};
@@ -16,7 +16,7 @@ const EquipmentSlotSpriteByType: any = {
16
16
  Ring: 'rings/iron-ring.png',
17
17
  Head: 'helmets/viking-helmet.png',
18
18
  Torso: 'armors/iron-armor.png',
19
- Legs: 'crafting-resources/medicinal-leaf.png',
19
+ Legs: 'legs/studded-legs.png',
20
20
  Feet: 'boots/iron-boots.png',
21
21
  Inventory: 'containers/bag.png',
22
22
  RightHand: 'shields/plate-shield.png',