@rpg-engine/long-bow 0.2.80 → 0.2.90
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/index.d.ts +5 -4
- package/dist/long-bow.cjs.development.js +141 -109
- 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 +141 -110
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/CraftBook/CraftBook.tsx +86 -78
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/index.tsx +5 -4
- package/src/mocks/.DS_Store +0 -0
- package/src/mocks/atlas/.DS_Store +0 -0
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -5,6 +5,7 @@ import { Button, ButtonTypes } from '../Button';
|
|
|
5
5
|
import { DraggableContainer } from '../DraggableContainer';
|
|
6
6
|
import { Dropdown, IOptionsProps } from '../Dropdown';
|
|
7
7
|
import { RPGUIContainerTypes } from '../RPGUIContainer';
|
|
8
|
+
import { RPGUIForceRenderStart } from '../RPGUIForceRenderStart';
|
|
8
9
|
import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
|
|
9
10
|
|
|
10
11
|
export interface IItemCraftSelectorProps {
|
|
@@ -79,85 +80,92 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
|
|
|
79
80
|
};
|
|
80
81
|
|
|
81
82
|
return (
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
onCloseButton={() => {
|
|
87
|
-
if (onClose) {
|
|
88
|
-
onClose();
|
|
89
|
-
}
|
|
90
|
-
}}
|
|
83
|
+
<RPGUIForceRenderStart
|
|
84
|
+
elementDOMId="radioInput"
|
|
85
|
+
elementRenderedDOMKey="rpgui-radio"
|
|
86
|
+
RPGUICreateFunction="radio"
|
|
91
87
|
>
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
88
|
+
<DraggableContainer
|
|
89
|
+
type={RPGUIContainerTypes.Framed}
|
|
90
|
+
width="500px"
|
|
91
|
+
cancelDrag=".equipment-container-body .arrow-selector"
|
|
92
|
+
onCloseButton={() => {
|
|
93
|
+
if (onClose) {
|
|
94
|
+
onClose();
|
|
95
|
+
}
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
<div style={{ width: '100%' }}>
|
|
99
|
+
<Title>{'Craftbook'}</Title>
|
|
100
|
+
<Subtitle>{'Select an item to craft'}</Subtitle>
|
|
101
|
+
<hr className="golden" />
|
|
102
|
+
</div>
|
|
103
|
+
<Dropdown
|
|
104
|
+
options={getDropdownOptions()}
|
|
105
|
+
onChange={value => onSelect(value)}
|
|
106
|
+
/>
|
|
107
|
+
<RadioInputScroller>
|
|
108
|
+
{craftablesItems?.map((option, index) => (
|
|
109
|
+
<RadioOptionsWrapper key={index}>
|
|
110
|
+
<SpriteAtlasWrapper>
|
|
111
|
+
<SpriteFromAtlas
|
|
112
|
+
atlasIMG={atlasIMG}
|
|
113
|
+
atlasJSON={atlasJSON}
|
|
114
|
+
spriteKey={option.texturePath}
|
|
115
|
+
imgScale={3}
|
|
116
|
+
grayScale={!option.canCraft}
|
|
117
|
+
/>
|
|
118
|
+
</SpriteAtlasWrapper>
|
|
119
|
+
<div>
|
|
120
|
+
<input
|
|
121
|
+
className="rpgui-radio"
|
|
122
|
+
type="radio"
|
|
123
|
+
value={option.name}
|
|
124
|
+
name="test"
|
|
125
|
+
disabled={!option.canCraft}
|
|
126
|
+
id="radioInput"
|
|
127
|
+
/>
|
|
128
|
+
<label
|
|
129
|
+
onClick={handleClick}
|
|
130
|
+
style={{ display: 'flex', alignItems: 'center' }}
|
|
131
|
+
onMouseEnter={() => setIsShown({ show: true, index: index })}
|
|
132
|
+
onMouseLeave={() => setIsShown({ show: false, index: index })}
|
|
133
|
+
>
|
|
134
|
+
{modifyString(option.name)}
|
|
135
|
+
</label>
|
|
136
|
+
|
|
137
|
+
{isShown &&
|
|
138
|
+
isShown.index === index &&
|
|
139
|
+
option.ingredients.map((option, index) => (
|
|
140
|
+
<Recipes key={index}>
|
|
141
|
+
<SpriteFromAtlas
|
|
142
|
+
atlasIMG={atlasIMG}
|
|
143
|
+
atlasJSON={atlasJSON}
|
|
144
|
+
spriteKey={option.texturePath}
|
|
145
|
+
imgScale={1}
|
|
146
|
+
/>
|
|
147
|
+
<StyledItem>
|
|
148
|
+
{modifyString(option.key)} ({option.qty}x)
|
|
149
|
+
</StyledItem>
|
|
150
|
+
</Recipes>
|
|
151
|
+
))}
|
|
152
|
+
</div>
|
|
153
|
+
</RadioOptionsWrapper>
|
|
154
|
+
))}
|
|
155
|
+
</RadioInputScroller>
|
|
156
|
+
<ButtonWrapper>
|
|
157
|
+
<Button buttonType={ButtonTypes.RPGUIButton} onClick={onClose}>
|
|
158
|
+
Cancel
|
|
159
|
+
</Button>
|
|
160
|
+
<Button
|
|
161
|
+
buttonType={ButtonTypes.RPGUIButton}
|
|
162
|
+
onClick={() => onCraftItem(craftItem)}
|
|
163
|
+
>
|
|
164
|
+
Craft
|
|
165
|
+
</Button>
|
|
166
|
+
</ButtonWrapper>
|
|
167
|
+
</DraggableContainer>
|
|
168
|
+
</RPGUIForceRenderStart>
|
|
161
169
|
);
|
|
162
170
|
};
|
|
163
171
|
|
|
Binary file
|
|
Binary file
|
package/src/index.tsx
CHANGED
|
@@ -12,6 +12,7 @@ export * from './components/Input';
|
|
|
12
12
|
export { ErrorBoundary } from './components/Item/Inventory/ErrorBoundary';
|
|
13
13
|
export * from './components/Item/Inventory/ItemContainer';
|
|
14
14
|
export * from './components/Item/Inventory/ItemSlot';
|
|
15
|
+
export * from './components/itemSelector/ItemSelector';
|
|
15
16
|
export * from './components/ListMenu';
|
|
16
17
|
export * from './components/NPCDialog/NPCDialog';
|
|
17
18
|
export * from './components/NPCDialog/NPCMultiDialog';
|
|
@@ -20,17 +21,17 @@ export * from './components/ProgressBar';
|
|
|
20
21
|
export * from './components/PropertySelect/PropertySelect';
|
|
21
22
|
export * from './components/QuestInfo/QuestInfo';
|
|
22
23
|
export * from './components/QuestList';
|
|
23
|
-
export * from './components/RPGUIContainer';
|
|
24
|
-
export * from './components/RPGUIRoot';
|
|
25
24
|
export * from './components/RadioButton';
|
|
26
25
|
export * from './components/RangeSlider';
|
|
26
|
+
export * from './components/RPGUIContainer';
|
|
27
|
+
export * from './components/RPGUIForceRenderStart';
|
|
28
|
+
export * from './components/RPGUIRoot';
|
|
29
|
+
export * from './components/shared/SpriteFromAtlas';
|
|
27
30
|
export * from './components/SkillProgressBar';
|
|
28
31
|
export * from './components/SkillsContainer';
|
|
29
32
|
export * from './components/TextArea';
|
|
30
33
|
export * from './components/TimeWidget/TimeWidget';
|
|
31
34
|
export * from './components/TradingMenu/TradingMenu';
|
|
32
35
|
export * from './components/Truncate';
|
|
33
|
-
export * from './components/itemSelector/ItemSelector';
|
|
34
|
-
export * from './components/shared/SpriteFromAtlas';
|
|
35
36
|
export * from './components/typography/DynamicText';
|
|
36
37
|
export { useEventListener } from './hooks/useEventListener';
|
|
Binary file
|
|
Binary file
|