pxt-arcade 2.0.16 → 2.0.19
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/built/editor.js +21 -0
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.json +1 -1
- package/built/theme.json +1 -1
- package/package.json +3 -3
- package/pxtarget.json +2 -0
package/built/editor.js
CHANGED
|
@@ -306,6 +306,27 @@ var pxt;
|
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
+
// Added the "use system keyboard" options to the ask for number and ask for string blocks
|
|
310
|
+
if (pxt.semver.strcmp(pkgTargetVersion || "0.0.0", "2.0.18") < 0) {
|
|
311
|
+
const allPromptBlocks = pxt.U.toArray(dom.querySelectorAll("block[type=gameaskforstring]"))
|
|
312
|
+
.concat(pxt.U.toArray(dom.querySelectorAll("shadow[type=gameaskforstring]")))
|
|
313
|
+
.concat(pxt.U.toArray(dom.querySelectorAll("block[type=gameaskfornumber]")))
|
|
314
|
+
.concat(pxt.U.toArray(dom.querySelectorAll("shadow[type=gameaskfornumber]")));
|
|
315
|
+
for (const block of allPromptBlocks) {
|
|
316
|
+
if (!getChildNode(block, "value", "name", "useSystemKeyboard")) {
|
|
317
|
+
const value = document.createElement("value");
|
|
318
|
+
value.setAttribute("name", "useSystemKeyboard");
|
|
319
|
+
const shadow = document.createElement("shadow");
|
|
320
|
+
shadow.setAttribute("type", "logic_boolean");
|
|
321
|
+
const field = document.createElement("field");
|
|
322
|
+
field.setAttribute("name", "BOOL");
|
|
323
|
+
field.textContent = "FALSE";
|
|
324
|
+
shadow.appendChild(field);
|
|
325
|
+
value.appendChild(shadow);
|
|
326
|
+
block.appendChild(value);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
309
330
|
}
|
|
310
331
|
function swapFieldIfNotMatching(eventRoot, fieldAName, fieldBName, fieldAShouldStartWith) {
|
|
311
332
|
const fieldA = eventRoot.querySelector(`field[name=${fieldAName}]`);
|