@rpg-engine/long-bow 0.2.81 → 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 +2 -2
- 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/dist/index.d.ts
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';
|
|
@@ -12,10 +12,10 @@ var dayjs = _interopDefault(require('dayjs'));
|
|
|
12
12
|
var reactErrorBoundary = require('react-error-boundary');
|
|
13
13
|
var Draggable = _interopDefault(require('react-draggable'));
|
|
14
14
|
var uuid = require('uuid');
|
|
15
|
-
var mobxReactLite = require('mobx-react-lite');
|
|
16
|
-
var isMobile = _interopDefault(require('is-mobile'));
|
|
17
15
|
require('rpgui/rpgui.min.css');
|
|
18
16
|
require('rpgui/rpgui.min.js');
|
|
17
|
+
var mobxReactLite = require('mobx-react-lite');
|
|
18
|
+
var isMobile = _interopDefault(require('is-mobile'));
|
|
19
19
|
var _ = _interopDefault(require('lodash'));
|
|
20
20
|
var capitalize = _interopDefault(require('lodash/capitalize'));
|
|
21
21
|
|
|
@@ -33105,6 +33105,41 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
|
33105
33105
|
return props.opened ? 'block' : 'none';
|
|
33106
33106
|
});
|
|
33107
33107
|
|
|
33108
|
+
//@ts-ignore
|
|
33109
|
+
var _RPGUI = RPGUI;
|
|
33110
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
33111
|
+
var children = _ref.children;
|
|
33112
|
+
return React__default.createElement("div", {
|
|
33113
|
+
className: "rpgui-content"
|
|
33114
|
+
}, children);
|
|
33115
|
+
};
|
|
33116
|
+
|
|
33117
|
+
var RPGUIForceRenderStart = function RPGUIForceRenderStart(_ref) {
|
|
33118
|
+
var children = _ref.children,
|
|
33119
|
+
elementDOMId = _ref.elementDOMId,
|
|
33120
|
+
elementRenderedDOMKey = _ref.elementRenderedDOMKey,
|
|
33121
|
+
RPGUICreateFunction = _ref.RPGUICreateFunction;
|
|
33122
|
+
var _useState = React.useState(false),
|
|
33123
|
+
isRendered = _useState[0],
|
|
33124
|
+
setIsRendered = _useState[1];
|
|
33125
|
+
React.useEffect(function () {
|
|
33126
|
+
if (_RPGUI) {
|
|
33127
|
+
var element = document.getElementById(elementDOMId);
|
|
33128
|
+
// create an interval to wait for the element to be rendered
|
|
33129
|
+
// if it's not, trigger the rendering forcefully
|
|
33130
|
+
var interval = setInterval(function () {
|
|
33131
|
+
var dropdown = document.querySelector(elementRenderedDOMKey);
|
|
33132
|
+
if (!dropdown && !isRendered) {
|
|
33133
|
+
_RPGUI.__create_funcs[RPGUICreateFunction](element);
|
|
33134
|
+
setIsRendered(true);
|
|
33135
|
+
clearInterval(interval);
|
|
33136
|
+
}
|
|
33137
|
+
}, 10);
|
|
33138
|
+
}
|
|
33139
|
+
}, []);
|
|
33140
|
+
return React__default.createElement(React__default.Fragment, null, children);
|
|
33141
|
+
};
|
|
33142
|
+
|
|
33108
33143
|
var CraftBook = function CraftBook(_ref) {
|
|
33109
33144
|
var atlasIMG = _ref.atlasIMG,
|
|
33110
33145
|
atlasJSON = _ref.atlasJSON,
|
|
@@ -33154,7 +33189,11 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33154
33189
|
var elementValue = element.value;
|
|
33155
33190
|
setCraftItem(elementValue);
|
|
33156
33191
|
};
|
|
33157
|
-
return React__default.createElement(
|
|
33192
|
+
return React__default.createElement(RPGUIForceRenderStart, {
|
|
33193
|
+
elementDOMId: "radioInput",
|
|
33194
|
+
elementRenderedDOMKey: "rpgui-radio",
|
|
33195
|
+
RPGUICreateFunction: "radio"
|
|
33196
|
+
}, React__default.createElement(DraggableContainer, {
|
|
33158
33197
|
type: exports.RPGUIContainerTypes.Framed,
|
|
33159
33198
|
width: "500px",
|
|
33160
33199
|
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
@@ -33188,7 +33227,8 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33188
33227
|
type: "radio",
|
|
33189
33228
|
value: option.name,
|
|
33190
33229
|
name: "test",
|
|
33191
|
-
disabled: !option.canCraft
|
|
33230
|
+
disabled: !option.canCraft,
|
|
33231
|
+
id: "radioInput"
|
|
33192
33232
|
}), React__default.createElement("label", {
|
|
33193
33233
|
onClick: handleClick,
|
|
33194
33234
|
style: {
|
|
@@ -33225,7 +33265,7 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33225
33265
|
onClick: function onClick() {
|
|
33226
33266
|
return onCraftItem(craftItem);
|
|
33227
33267
|
}
|
|
33228
|
-
}, "Craft")));
|
|
33268
|
+
}, "Craft"))));
|
|
33229
33269
|
};
|
|
33230
33270
|
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
33231
33271
|
displayName: "CraftBook__StyledItem",
|
|
@@ -34304,6 +34344,92 @@ var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34304
34344
|
componentId: "sc-15y5p9l-0"
|
|
34305
34345
|
})(["max-width:280px;display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
34306
34346
|
|
|
34347
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34348
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34349
|
+
atlasJSON = _ref.atlasJSON,
|
|
34350
|
+
options = _ref.options,
|
|
34351
|
+
onClose = _ref.onClose,
|
|
34352
|
+
onSelect = _ref.onSelect;
|
|
34353
|
+
var _useState = React.useState(),
|
|
34354
|
+
selectedValue = _useState[0],
|
|
34355
|
+
setSelectedValue = _useState[1];
|
|
34356
|
+
var handleClick = function handleClick() {
|
|
34357
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34358
|
+
var elementValue = element.value;
|
|
34359
|
+
setSelectedValue(elementValue);
|
|
34360
|
+
};
|
|
34361
|
+
React.useEffect(function () {
|
|
34362
|
+
if (selectedValue) {
|
|
34363
|
+
onSelect(selectedValue);
|
|
34364
|
+
}
|
|
34365
|
+
}, [selectedValue]);
|
|
34366
|
+
return React__default.createElement(DraggableContainer, {
|
|
34367
|
+
type: exports.RPGUIContainerTypes.Framed,
|
|
34368
|
+
width: "500px",
|
|
34369
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34370
|
+
onCloseButton: function onCloseButton() {
|
|
34371
|
+
if (onClose) {
|
|
34372
|
+
onClose();
|
|
34373
|
+
}
|
|
34374
|
+
}
|
|
34375
|
+
}, React__default.createElement("div", {
|
|
34376
|
+
style: {
|
|
34377
|
+
width: '100%'
|
|
34378
|
+
}
|
|
34379
|
+
}, React__default.createElement(Title$2, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
34380
|
+
className: "golden"
|
|
34381
|
+
})), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34382
|
+
return React__default.createElement(RadioOptionsWrapper$1, {
|
|
34383
|
+
key: index
|
|
34384
|
+
}, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
34385
|
+
atlasIMG: atlasIMG,
|
|
34386
|
+
atlasJSON: atlasJSON,
|
|
34387
|
+
spriteKey: option.imageKey,
|
|
34388
|
+
imgScale: 3
|
|
34389
|
+
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
34390
|
+
className: "rpgui-radio",
|
|
34391
|
+
type: "radio",
|
|
34392
|
+
value: option.name,
|
|
34393
|
+
name: "test"
|
|
34394
|
+
}), React__default.createElement("label", {
|
|
34395
|
+
onClick: handleClick,
|
|
34396
|
+
style: {
|
|
34397
|
+
display: 'flex',
|
|
34398
|
+
alignItems: 'center'
|
|
34399
|
+
}
|
|
34400
|
+
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
34401
|
+
})), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
|
|
34402
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
34403
|
+
onClick: onClose
|
|
34404
|
+
}, "Cancel"), React__default.createElement(Button, {
|
|
34405
|
+
buttonType: exports.ButtonTypes.RPGUIButton
|
|
34406
|
+
}, "Select")));
|
|
34407
|
+
};
|
|
34408
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34409
|
+
displayName: "ItemSelector__Title",
|
|
34410
|
+
componentId: "sc-gptoxp-0"
|
|
34411
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34412
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34413
|
+
displayName: "ItemSelector__Subtitle",
|
|
34414
|
+
componentId: "sc-gptoxp-1"
|
|
34415
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34416
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34417
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34418
|
+
componentId: "sc-gptoxp-2"
|
|
34419
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
34420
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34421
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34422
|
+
componentId: "sc-gptoxp-3"
|
|
34423
|
+
})(["margin-right:40px;"]);
|
|
34424
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34425
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34426
|
+
componentId: "sc-gptoxp-4"
|
|
34427
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34428
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34429
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34430
|
+
componentId: "sc-gptoxp-5"
|
|
34431
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34432
|
+
|
|
34307
34433
|
var ListMenu = function ListMenu(_ref) {
|
|
34308
34434
|
var options = _ref.options,
|
|
34309
34435
|
onSelected = _ref.onSelected,
|
|
@@ -34439,7 +34565,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34439
34565
|
onTouchStart: onRightClick
|
|
34440
34566
|
}), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
34441
34567
|
className: "drag-handler"
|
|
34442
|
-
}, React__default.createElement(Title$
|
|
34568
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
34443
34569
|
src: quests[currentIndex].thumbnail || img$9
|
|
34444
34570
|
}), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
34445
34571
|
className: "golden"
|
|
@@ -34458,7 +34584,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34458
34584
|
}, button.title);
|
|
34459
34585
|
})))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
34460
34586
|
className: "drag-handler"
|
|
34461
|
-
}, React__default.createElement(Title$
|
|
34587
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
34462
34588
|
src: quests[0].thumbnail || img$9
|
|
34463
34589
|
}), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
34464
34590
|
className: "golden"
|
|
@@ -34505,7 +34631,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
34505
34631
|
displayName: "QuestInfo__TitleContainer",
|
|
34506
34632
|
componentId: "sc-15s2boc-6"
|
|
34507
34633
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
34508
|
-
var Title$
|
|
34634
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34509
34635
|
displayName: "QuestInfo__Title",
|
|
34510
34636
|
componentId: "sc-15s2boc-7"
|
|
34511
34637
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -34527,7 +34653,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
34527
34653
|
style: {
|
|
34528
34654
|
width: '100%'
|
|
34529
34655
|
}
|
|
34530
|
-
}, React__default.createElement(Title$
|
|
34656
|
+
}, React__default.createElement(Title$4, null, "Quests"), React__default.createElement("hr", {
|
|
34531
34657
|
className: "golden"
|
|
34532
34658
|
}), React__default.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
34533
34659
|
return React__default.createElement("div", {
|
|
@@ -34548,7 +34674,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
34548
34674
|
displayName: "QuestList__QuestDraggableContainer",
|
|
34549
34675
|
componentId: "sc-1a2vx6q-0"
|
|
34550
34676
|
})([".container-close{top:10px;right:10px;}.quest-title{text-align:left;margin-left:44px;margin-top:20px;color:yellow;}.quest-desc{margin-top:12px;margin-left:44px;}.rpgui-progress{min-width:80%;margin:0 auto;}"]);
|
|
34551
|
-
var Title$
|
|
34677
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
34552
34678
|
displayName: "QuestList__Title",
|
|
34553
34679
|
componentId: "sc-1a2vx6q-1"
|
|
34554
34680
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -34561,15 +34687,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34561
34687
|
componentId: "sc-1a2vx6q-3"
|
|
34562
34688
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
34563
34689
|
|
|
34564
|
-
//@ts-ignore
|
|
34565
|
-
var _RPGUI = RPGUI;
|
|
34566
|
-
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
34567
|
-
var children = _ref.children;
|
|
34568
|
-
return React__default.createElement("div", {
|
|
34569
|
-
className: "rpgui-content"
|
|
34570
|
-
}, children);
|
|
34571
|
-
};
|
|
34572
|
-
|
|
34573
34690
|
var InputRadio = function InputRadio(_ref) {
|
|
34574
34691
|
var name = _ref.name,
|
|
34575
34692
|
items = _ref.items,
|
|
@@ -35040,7 +35157,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35040
35157
|
style: {
|
|
35041
35158
|
width: '100%'
|
|
35042
35159
|
}
|
|
35043
|
-
}, React__default.createElement(Title$
|
|
35160
|
+
}, React__default.createElement(Title$5, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
|
|
35044
35161
|
className: "golden"
|
|
35045
35162
|
})), React__default.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
|
|
35046
35163
|
var _qtyMap$get;
|
|
@@ -35053,7 +35170,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35053
35170
|
traderItem: tradeItem,
|
|
35054
35171
|
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
35055
35172
|
}));
|
|
35056
|
-
})), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), !hasGoldForSale() ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", getFinalGold())), React__default.createElement(ButtonWrapper$
|
|
35173
|
+
})), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), !hasGoldForSale() ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", getFinalGold())), React__default.createElement(ButtonWrapper$2, null, React__default.createElement(Button, {
|
|
35057
35174
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35058
35175
|
disabled: !hasGoldForSale(),
|
|
35059
35176
|
onClick: function onClick() {
|
|
@@ -35066,7 +35183,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35066
35183
|
}
|
|
35067
35184
|
}, "Cancel"))));
|
|
35068
35185
|
};
|
|
35069
|
-
var Title$
|
|
35186
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35070
35187
|
displayName: "TradingMenu__Title",
|
|
35071
35188
|
componentId: "sc-1wjsz1l-0"
|
|
35072
35189
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -35090,7 +35207,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
35090
35207
|
displayName: "TradingMenu__AlertWrapper",
|
|
35091
35208
|
componentId: "sc-1wjsz1l-5"
|
|
35092
35209
|
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
35093
|
-
var ButtonWrapper$
|
|
35210
|
+
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35094
35211
|
displayName: "TradingMenu__ButtonWrapper",
|
|
35095
35212
|
componentId: "sc-1wjsz1l-6"
|
|
35096
35213
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
|
|
@@ -35111,92 +35228,6 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
|
35111
35228
|
return props.maxLines;
|
|
35112
35229
|
});
|
|
35113
35230
|
|
|
35114
|
-
var ItemSelector = function ItemSelector(_ref) {
|
|
35115
|
-
var atlasIMG = _ref.atlasIMG,
|
|
35116
|
-
atlasJSON = _ref.atlasJSON,
|
|
35117
|
-
options = _ref.options,
|
|
35118
|
-
onClose = _ref.onClose,
|
|
35119
|
-
onSelect = _ref.onSelect;
|
|
35120
|
-
var _useState = React.useState(),
|
|
35121
|
-
selectedValue = _useState[0],
|
|
35122
|
-
setSelectedValue = _useState[1];
|
|
35123
|
-
var handleClick = function handleClick() {
|
|
35124
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
35125
|
-
var elementValue = element.value;
|
|
35126
|
-
setSelectedValue(elementValue);
|
|
35127
|
-
};
|
|
35128
|
-
React.useEffect(function () {
|
|
35129
|
-
if (selectedValue) {
|
|
35130
|
-
onSelect(selectedValue);
|
|
35131
|
-
}
|
|
35132
|
-
}, [selectedValue]);
|
|
35133
|
-
return React__default.createElement(DraggableContainer, {
|
|
35134
|
-
type: exports.RPGUIContainerTypes.Framed,
|
|
35135
|
-
width: "500px",
|
|
35136
|
-
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
35137
|
-
onCloseButton: function onCloseButton() {
|
|
35138
|
-
if (onClose) {
|
|
35139
|
-
onClose();
|
|
35140
|
-
}
|
|
35141
|
-
}
|
|
35142
|
-
}, React__default.createElement("div", {
|
|
35143
|
-
style: {
|
|
35144
|
-
width: '100%'
|
|
35145
|
-
}
|
|
35146
|
-
}, React__default.createElement(Title$5, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
35147
|
-
className: "golden"
|
|
35148
|
-
})), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
35149
|
-
return React__default.createElement(RadioOptionsWrapper$1, {
|
|
35150
|
-
key: index
|
|
35151
|
-
}, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
35152
|
-
atlasIMG: atlasIMG,
|
|
35153
|
-
atlasJSON: atlasJSON,
|
|
35154
|
-
spriteKey: option.imageKey,
|
|
35155
|
-
imgScale: 3
|
|
35156
|
-
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
35157
|
-
className: "rpgui-radio",
|
|
35158
|
-
type: "radio",
|
|
35159
|
-
value: option.name,
|
|
35160
|
-
name: "test"
|
|
35161
|
-
}), React__default.createElement("label", {
|
|
35162
|
-
onClick: handleClick,
|
|
35163
|
-
style: {
|
|
35164
|
-
display: 'flex',
|
|
35165
|
-
alignItems: 'center'
|
|
35166
|
-
}
|
|
35167
|
-
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
35168
|
-
})), React__default.createElement(ButtonWrapper$2, null, React__default.createElement(Button, {
|
|
35169
|
-
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35170
|
-
onClick: onClose
|
|
35171
|
-
}, "Cancel"), React__default.createElement(Button, {
|
|
35172
|
-
buttonType: exports.ButtonTypes.RPGUIButton
|
|
35173
|
-
}, "Select")));
|
|
35174
|
-
};
|
|
35175
|
-
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35176
|
-
displayName: "ItemSelector__Title",
|
|
35177
|
-
componentId: "sc-gptoxp-0"
|
|
35178
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
35179
|
-
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
35180
|
-
displayName: "ItemSelector__Subtitle",
|
|
35181
|
-
componentId: "sc-gptoxp-1"
|
|
35182
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
35183
|
-
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35184
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
35185
|
-
componentId: "sc-gptoxp-2"
|
|
35186
|
-
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
35187
|
-
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35188
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
35189
|
-
componentId: "sc-gptoxp-3"
|
|
35190
|
-
})(["margin-right:40px;"]);
|
|
35191
|
-
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35192
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
35193
|
-
componentId: "sc-gptoxp-4"
|
|
35194
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
35195
|
-
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35196
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
35197
|
-
componentId: "sc-gptoxp-5"
|
|
35198
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
35199
|
-
|
|
35200
35231
|
exports.Button = Button;
|
|
35201
35232
|
exports.CharacterSelection = CharacterSelection;
|
|
35202
35233
|
exports.Chat = Chat;
|
|
@@ -35223,6 +35254,7 @@ exports.QuestInfo = QuestInfo;
|
|
|
35223
35254
|
exports.QuestList = QuestList;
|
|
35224
35255
|
exports.QuestionDialog = QuestionDialog;
|
|
35225
35256
|
exports.RPGUIContainer = RPGUIContainer;
|
|
35257
|
+
exports.RPGUIForceRenderStart = RPGUIForceRenderStart;
|
|
35226
35258
|
exports.RPGUIRoot = RPGUIRoot;
|
|
35227
35259
|
exports.RangeSlider = RangeSlider;
|
|
35228
35260
|
exports.SkillProgressBar = SkillProgressBar;
|