diff --git a/help/README.md b/help/README.md new file mode 100644 index 0000000000..cfefd632a8 --- /dev/null +++ b/help/README.md @@ -0,0 +1,104 @@ +# Translating Help Screens + +See [CONTRIBUTING.md](../CONTRIBUTING.md) for a general guide on translating Snap!. + +## 1. Setup + +If you haven't already downloaded a copy of the Snap! source, go to +[GitHub](https://github.com/jmoenig/Snap) and click "Clone or download". + +For the Help translator library to work, you'll need to put Snap! on a local HTTP +server. See [Mozilla's documentation](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server#Running_a_simple_local_HTTP_server) +for an example of how to do this. + +Create a copy of the `en` directory in the `help` directory, naming it the +the same as code for the corresponding translation file in the `locale/` directory. +(e.g. `help/ja_HIRA/` for the Japanese Hirogama translation.) +). + +## 2. Translation + +Replace the English text in the XML files with the translated text. + +The translated versions of block spec will be used automatically. For example, +`` should be left as-is. + +Block inputs are not automatically translated unless enclosed in ` + + + Keep doing this: + Move 10 steps + If at the edge of the stage, then turn around + + + + + + + +

+ + + checks to see if this sprite has reached the edge – and + if it has, it turns away from the edge. (And then is + ready for the next move.) + +

+
+
+ diff --git a/help/en/bounceOffEdge_cats.png b/help/en/bounceOffEdge_cats.png new file mode 100644 index 0000000000..2e843c7350 Binary files /dev/null and b/help/en/bounceOffEdge_cats.png differ diff --git a/help/en/bubble.png b/help/en/bubble.png new file mode 100755 index 0000000000..cf8fe94a72 Binary files /dev/null and b/help/en/bubble.png differ diff --git a/help/en/bubble.xml b/help/en/bubble.xml new file mode 100644 index 0000000000..cebecded0b --- /dev/null +++ b/help/en/bubble.xml @@ -0,0 +1,45 @@ + + + + + + + + + + Show "Hello there!" in a voice bubble + Wait a second + Remove voice bubble + + + + + + + +

+ You can type any phrase into + +

+

The words will appear above the sprite, in a voice bubble.

+
+
+
diff --git a/help/en/bubble_cats.png b/help/en/bubble_cats.png new file mode 100644 index 0000000000..f43f0fb4e0 Binary files /dev/null and b/help/en/bubble_cats.png differ diff --git a/help/en/catch.png b/help/en/catch.png new file mode 100644 index 0000000000..df1bb46e6d Binary files /dev/null and b/help/en/catch.png differ diff --git a/help/en/catch.xml b/help/en/catch.xml new file mode 100644 index 0000000000..ba107f1da4 --- /dev/null +++ b/help/en/catch.xml @@ -0,0 +1,164 @@ + + + + + + +
+ + + +
+ +
+ + + + +
+
+ + + +
Allow early exit from a script.
+ + + + + + + + + + + Done! + + + + + +

+ + The loop was supposed to go until i=10, but the + + + + block jumped out to the matching + + +

+
+
+
+
+ + + + + + + + +

+ Drag the orange tag from the + catch + block to the + throw + block. +

+
+ +

+ + You can change the tag's name by clicking on it + without dragging; then you can nest more than one + + catch + block: +

+
+ + + + + + + + + + + + + + + You can use either tag here! + + + +
+
+
diff --git a/help/en/catch_alonzo.png b/help/en/catch_alonzo.png new file mode 100644 index 0000000000..f6a44864d2 Binary files /dev/null and b/help/en/catch_alonzo.png differ diff --git a/help/en/catch_bubbles.png b/help/en/catch_bubbles.png new file mode 100644 index 0000000000..853eba82df Binary files /dev/null and b/help/en/catch_bubbles.png differ diff --git a/help/en/changeEffect.png b/help/en/changeEffect.png new file mode 100755 index 0000000000..f2d00dafee Binary files /dev/null and b/help/en/changeEffect.png differ diff --git a/help/en/changeEffect.xml b/help/en/changeEffect.xml new file mode 100644 index 0000000000..8c6c4a4552 --- /dev/null +++ b/help/en/changeEffect.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + Repeat 4 times: + Change the color effect by 40 + Wait 1 second + + + + + + Original + + + + After 1 secs + + + + After 2 secs + + + + After 3 secs + + + + After 4 secs + + + + + + + + + + + color + saturation + brightness + ghost + fisheye + whirl + pixelate + mosaic + negative + + + + + Click to choose an effect from the menu + + + +

Try these effects with numbers like 10, 35, or 100.

+

You can try negative numbers, too, like -50.

+
+
+
diff --git a/help/en/changeEffect_dog1.png b/help/en/changeEffect_dog1.png new file mode 100644 index 0000000000..bb90e7eb0a Binary files /dev/null and b/help/en/changeEffect_dog1.png differ diff --git a/help/en/changeEffect_dog2.png b/help/en/changeEffect_dog2.png new file mode 100644 index 0000000000..db536e05aa Binary files /dev/null and b/help/en/changeEffect_dog2.png differ diff --git a/help/en/changeEffect_dog3.png b/help/en/changeEffect_dog3.png new file mode 100644 index 0000000000..2a7497ba7a Binary files /dev/null and b/help/en/changeEffect_dog3.png differ diff --git a/help/en/changeEffect_dog4.png b/help/en/changeEffect_dog4.png new file mode 100644 index 0000000000..557b3fdbb6 Binary files /dev/null and b/help/en/changeEffect_dog4.png differ diff --git a/help/en/changeEffect_dog5.png b/help/en/changeEffect_dog5.png new file mode 100644 index 0000000000..2aa5501637 Binary files /dev/null and b/help/en/changeEffect_dog5.png differ diff --git a/help/en/changePan.png b/help/en/changePan.png new file mode 100755 index 0000000000..a5063d6390 Binary files /dev/null and b/help/en/changePan.png differ diff --git a/help/en/changePan.xml b/help/en/changePan.xml new file mode 100644 index 0000000000..1527ae97d2 --- /dev/null +++ b/help/en/changePan.xml @@ -0,0 +1,22 @@ + + + + +
Change balance for sounds.
+ + +

+ 0 is normal. -100 is left channel only; 100 is right channel + only. +

+

+ Each sprite has its own balance, which can be inherited by + clones. +

+
+
+
diff --git a/help/en/changePenHSVA.png b/help/en/changePenHSVA.png new file mode 100644 index 0000000000..bcafcc1b02 Binary files /dev/null and b/help/en/changePenHSVA.png differ diff --git a/help/en/changePenHSVA.xml b/help/en/changePenHSVA.xml new file mode 100644 index 0000000000..653914d6ce --- /dev/null +++ b/help/en/changePenHSVA.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + hue + saturation + brightness + transparency + + + + + Numeric range is 0-100. Hue wraps around (mod 100). + For the others, anything <0 is 0, anything >100 + is 100. + + + + + + + diff --git a/help/en/changePenHSVA_graph.svg b/help/en/changePenHSVA_graph.svg new file mode 100644 index 0000000000..aad94fbf52 --- /dev/null +++ b/help/en/changePenHSVA_graph.svg @@ -0,0 +1,328 @@ + + + + + + + + + + image/svg+xml + + + + + + + 0 + 100 + hue + saturation + brightness + transparency + + + diff --git a/help/en/changeScale.png b/help/en/changeScale.png new file mode 100644 index 0000000000..76cd1bda6e Binary files /dev/null and b/help/en/changeScale.png differ diff --git a/help/en/changeScale.xml b/help/en/changeScale.xml new file mode 100644 index 0000000000..22e4c5dc10 --- /dev/null +++ b/help/en/changeScale.xml @@ -0,0 +1,33 @@ + + + + + + + + + + Grows the sprite by 10% of original size + + + + + + Shrinks the sprite by 10% of original size + + + + + diff --git a/help/en/changeSize.png b/help/en/changeSize.png new file mode 100644 index 0000000000..963b13bbab Binary files /dev/null and b/help/en/changeSize.png differ diff --git a/help/en/changeSize.xml b/help/en/changeSize.xml new file mode 100644 index 0000000000..b02da43281 --- /dev/null +++ b/help/en/changeSize.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + Start with pen size 1 + Repeat 100 times: + Move a little + Turn a little + Increase the pen size by 1 + + + + + + diff --git a/help/en/changeSize_cat.png b/help/en/changeSize_cat.png new file mode 100644 index 0000000000..c5df361d17 Binary files /dev/null and b/help/en/changeSize_cat.png differ diff --git a/help/en/changeVolume.png b/help/en/changeVolume.png new file mode 100755 index 0000000000..ea87906ba3 Binary files /dev/null and b/help/en/changeVolume.png differ diff --git a/help/en/changeVolume.xml b/help/en/changeVolume.xml new file mode 100644 index 0000000000..3b47ae4766 --- /dev/null +++ b/help/en/changeVolume.xml @@ -0,0 +1,22 @@ + + + + +
Change volume for sounds.
+ + +

+ 100% is the maximum sound possible. + 50% is already quite soft! +

+

+ Each sprite has its own volume, which can be inherited by + clones. +

+
+
+
diff --git a/help/en/changeXPosition.png b/help/en/changeXPosition.png new file mode 100755 index 0000000000..f063dd7579 Binary files /dev/null and b/help/en/changeXPosition.png differ diff --git a/help/en/changeXPosition.xml b/help/en/changeXPosition.xml new file mode 100644 index 0000000000..7573900b59 --- /dev/null +++ b/help/en/changeXPosition.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + Change x by a positive number moves the sprite to the + right + + + + + + + + + + + Change x by a negative number moves the sprite to the + left + + + + + + + + diff --git a/help/en/changeXPosition_cat_left.png b/help/en/changeXPosition_cat_left.png new file mode 100644 index 0000000000..f526e4cd5f Binary files /dev/null and b/help/en/changeXPosition_cat_left.png differ diff --git a/help/en/changeXPosition_cat_right.png b/help/en/changeXPosition_cat_right.png new file mode 100644 index 0000000000..8cf86b8194 Binary files /dev/null and b/help/en/changeXPosition_cat_right.png differ diff --git a/help/en/changeYPosition.png b/help/en/changeYPosition.png new file mode 100755 index 0000000000..1ff28a719f Binary files /dev/null and b/help/en/changeYPosition.png differ diff --git a/help/en/changeYPosition.xml b/help/en/changeYPosition.xml new file mode 100644 index 0000000000..077d07452e --- /dev/null +++ b/help/en/changeYPosition.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + Change y by a positive number moves the sprite up + + + + + + + + + + + Change y by a negative number moves the sprite down + + + + + + + + diff --git a/help/en/changeYPosition_cat_down.png b/help/en/changeYPosition_cat_down.png new file mode 100644 index 0000000000..f44801095c Binary files /dev/null and b/help/en/changeYPosition_cat_down.png differ diff --git a/help/en/changeYPosition_cat_up.png b/help/en/changeYPosition_cat_up.png new file mode 100644 index 0000000000..69d636fc67 Binary files /dev/null and b/help/en/changeYPosition_cat_up.png differ diff --git a/help/en/checkbox.png b/help/en/checkbox.png new file mode 100644 index 0000000000..4be9bb9168 Binary files /dev/null and b/help/en/checkbox.png differ diff --git a/help/en/checkbox_unchecked.png b/help/en/checkbox_unchecked.png new file mode 100644 index 0000000000..d594e46133 Binary files /dev/null and b/help/en/checkbox_unchecked.png differ diff --git a/help/en/clear.png b/help/en/clear.png new file mode 100755 index 0000000000..75c618f893 Binary files /dev/null and b/help/en/clear.png differ diff --git a/help/en/clear.xml b/help/en/clear.xml new file mode 100644 index 0000000000..18133371e5 --- /dev/null +++ b/help/en/clear.xml @@ -0,0 +1,28 @@ + + + + + + + + + +

Clears all pen marks and stamps from the stage

+
+
+
+
+ + +

+ Note: The pen marks and stamps are not part of the background + costume. Therefore, when they are cleared, the background + costume remains unchanged. +

+
+
+
diff --git a/help/en/clearEffects.png b/help/en/clearEffects.png new file mode 100644 index 0000000000..2d7981a987 Binary files /dev/null and b/help/en/clearEffects.png differ diff --git a/help/en/clearEffects.xml b/help/en/clearEffects.xml new file mode 100644 index 0000000000..e4ce345c52 --- /dev/null +++ b/help/en/clearEffects.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + +

+ + clears all the graphic effects for this sprite. +

+
+
+
diff --git a/help/en/clearEffects_dog1.png b/help/en/clearEffects_dog1.png new file mode 100644 index 0000000000..21f011d1d3 Binary files /dev/null and b/help/en/clearEffects_dog1.png differ diff --git a/help/en/clearEffects_dog2.png b/help/en/clearEffects_dog2.png new file mode 100644 index 0000000000..4b6e3ef269 Binary files /dev/null and b/help/en/clearEffects_dog2.png differ diff --git a/help/en/createClone.png b/help/en/createClone.png new file mode 100644 index 0000000000..9c76c6aa44 Binary files /dev/null and b/help/en/createClone.png differ diff --git a/help/en/createClone.xml b/help/en/createClone.xml new file mode 100644 index 0000000000..2e5d53a0f4 --- /dev/null +++ b/help/en/createClone.xml @@ -0,0 +1,47 @@ + + + + + + +

+ + Create a clone of the selected sprite, with the same + position, direction, costumes, sounds, local variables, + local blocks, and scripts. Most of these properties are + shared with the original, so that a change in the + original changes the clone, but not the other way around. + Temporary clones are deleted when the stop button + + + is pressed. +

+

+ + The clone will not be visible immediately because it is + in exactly the same position as the original! See the + + + + block for a way to change this. + +

+
+
+ + +

+ Note: Snap! clones are not copies of the sprite; they + actually share information, so a change in the original may + be seen in the clones. See the “Object Oriented Programming + with Sprites” chapter in the Snap! Reference Manual. +

+
+
+
diff --git a/help/en/createClone_stop.png b/help/en/createClone_stop.png new file mode 100644 index 0000000000..93db5050a6 Binary files /dev/null and b/help/en/createClone_stop.png differ diff --git a/help/en/deleteVariable.png b/help/en/deleteVariable.png new file mode 100755 index 0000000000..22d4aef15f Binary files /dev/null and b/help/en/deleteVariable.png differ diff --git a/help/en/deleteVariable.xml b/help/en/deleteVariable.xml new file mode 100644 index 0000000000..ed4190f5b8 --- /dev/null +++ b/help/en/deleteVariable.xml @@ -0,0 +1,23 @@ + + + + + + + + + Deletes all three blocks associated with the selected + variable (e.g. score) + + + + + +

+ Note: When a variable is deleted, any of its blocks used in + scripts will remain, but the scripts will not function + properly. +

+
+
+
diff --git a/help/en/deleteVariable_button.png b/help/en/deleteVariable_button.png new file mode 100644 index 0000000000..fa0c120612 Binary files /dev/null and b/help/en/deleteVariable_button.png differ diff --git a/help/en/deleteVariable_menu.png b/help/en/deleteVariable_menu.png new file mode 100644 index 0000000000..01f1d49bcb Binary files /dev/null and b/help/en/deleteVariable_menu.png differ diff --git a/help/en/direction.png b/help/en/direction.png new file mode 100755 index 0000000000..587026ce10 Binary files /dev/null and b/help/en/direction.png differ diff --git a/help/en/direction.xml b/help/en/direction.xml new file mode 100644 index 0000000000..ed8977ae86 --- /dev/null +++ b/help/en/direction.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + If pointing in direction 0 (up) + Then do this + + + + + + + + +

+ To see this sprite's current direction, click the checkbox + next to the block. +

+ + + + +
+
+
+
diff --git a/help/en/direction_watcher.png b/help/en/direction_watcher.png new file mode 100644 index 0000000000..87ac6329e2 Binary files /dev/null and b/help/en/direction_watcher.png differ diff --git a/help/en/doAddToList.png b/help/en/doAddToList.png new file mode 100644 index 0000000000..9f043f831e Binary files /dev/null and b/help/en/doAddToList.png differ diff --git a/help/en/doAddToList.xml b/help/en/doAddToList.xml new file mode 100644 index 0000000000..11a89a3d2f --- /dev/null +++ b/help/en/doAddToList.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + Say one of the items in the list + + + + + + +

Use this block to add an item to the end of a list.

+ + + + + + + + +

+ Make an empty list: + +

+
+
+
diff --git a/help/en/doAddToList_my_list.png b/help/en/doAddToList_my_list.png new file mode 100644 index 0000000000..80c0be0703 Binary files /dev/null and b/help/en/doAddToList_my_list.png differ diff --git a/help/en/doAsk.png b/help/en/doAsk.png new file mode 100755 index 0000000000..944ff99215 Binary files /dev/null and b/help/en/doAsk.png differ diff --git a/help/en/doAsk.xml b/help/en/doAsk.xml new file mode 100644 index 0000000000..d8566398c4 --- /dev/null +++ b/help/en/doAsk.xml @@ -0,0 +1,53 @@ + + + + + + + + + + Ask and wait for the user to type their response + Say "It's nice to meet you" + Say the response + + + + + + +

+ + asks a question and stores the keyboard input in + + + . The question appears in a voice balloon on the screen. The + program waits as the user types in a response, until the + Enter key is pressed or the check mark is clicked. + +

+
+
+
diff --git a/help/en/doBroadcast.png b/help/en/doBroadcast.png new file mode 100644 index 0000000000..01f7a22bc5 Binary files /dev/null and b/help/en/doBroadcast.png differ diff --git a/help/en/doBroadcast.xml b/help/en/doBroadcast.xml new file mode 100644 index 0000000000..2c51e3ee66 --- /dev/null +++ b/help/en/doBroadcast.xml @@ -0,0 +1,50 @@ + + + + + + + + + +

Sends the message "jump" to all sprites

+
+
+
+
+ + +

+ + + sends a message to all the sprites (and the stage). This + is useful if you want to tell other sprites when to do + something. + +

+

+ + What do you want them to do when they receive the + message? See + + +

+
+
+
diff --git a/help/en/doBroadcastAndWait.png b/help/en/doBroadcastAndWait.png new file mode 100755 index 0000000000..b46f58c962 Binary files /dev/null and b/help/en/doBroadcastAndWait.png differ diff --git a/help/en/doBroadcastAndWait.xml b/help/en/doBroadcastAndWait.xml new file mode 100644 index 0000000000..faa4a929e8 --- /dev/null +++ b/help/en/doBroadcastAndWait.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + Send the message "jump" and wait until all the jumps + are done + + Then do this + + + + + + Whenever the message "jump" is sent + Do this + + + + + + +

+ You can use + + + to send a message to all sprites to tell them to do + something, and wait until they all finish before continuing. + +

+ + + + + new... + + + + + Click to choose which message gets sent + + + Choose "new" to type in your own message + + + +
+
+
diff --git a/help/en/doCallCC.png b/help/en/doCallCC.png new file mode 100644 index 0000000000..74626af0f8 Binary files /dev/null and b/help/en/doCallCC.png differ diff --git a/help/en/doCallCC.xml b/help/en/doCallCC.xml new file mode 100644 index 0000000000..228ce9390b --- /dev/null +++ b/help/en/doCallCC.xml @@ -0,0 +1,93 @@ + + + + +
Capture command continuation
+ + + + + + cont + + + + + + + + + + + + + + + + + + + + + + +

+ + Continuations are too complicated to explain in a help + screen, but they're used to invent control structures + such as the + + catch + and + throw + + tool blocks. Read the chapter in the Snap! Reference + Manual if you want to know more. + +

+
+
+
diff --git a/help/en/doCallCC_stage1.png b/help/en/doCallCC_stage1.png new file mode 100644 index 0000000000..5cf4d9a602 Binary files /dev/null and b/help/en/doCallCC_stage1.png differ diff --git a/help/en/doCallCC_stage2.png b/help/en/doCallCC_stage2.png new file mode 100644 index 0000000000..cbe504bf48 Binary files /dev/null and b/help/en/doCallCC_stage2.png differ diff --git a/help/en/doChangeTempo.png b/help/en/doChangeTempo.png new file mode 100755 index 0000000000..9aa1125473 Binary files /dev/null and b/help/en/doChangeTempo.png differ diff --git a/help/en/doChangeTempo.xml b/help/en/doChangeTempo.xml new file mode 100644 index 0000000000..6b70687ad7 --- /dev/null +++ b/help/en/doChangeTempo.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + Set tempo to 60 beats per minute + Keep doing this: + Play a note for 0.5 beats + Increase the tempo by 20 beats + If the tempo is greater than 500 + Stop this script + + + + + + +

+ Tempo is the speed (bpm = beats per minute) at which Snap! notes + and drums play. The larger the tempo value, the faster the notes + and drums will play. +

+ + + + 0.5 beats = 0.5 seconds at 60 bpm + + + + + + 0.2 beats = 0.1 seconds at 120 bpm + + +
+
+
diff --git a/help/en/doChangeVar.png b/help/en/doChangeVar.png new file mode 100755 index 0000000000..ccf73b7e1e Binary files /dev/null and b/help/en/doChangeVar.png differ diff --git a/help/en/doChangeVar.xml b/help/en/doChangeVar.xml new file mode 100644 index 0000000000..94a77c54e0 --- /dev/null +++ b/help/en/doChangeVar.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + When the green flag button is clicked + Set score to 0 (reset the score) + Keep doing this: + Point toward the mouse-pointer + Move + If you catch Sprite(2) + Increase your score + + + + + diff --git a/help/en/doDeclareVariables.png b/help/en/doDeclareVariables.png new file mode 100644 index 0000000000..1f85273f08 Binary files /dev/null and b/help/en/doDeclareVariables.png differ diff --git a/help/en/doDeclareVariables.xml b/help/en/doDeclareVariables.xml new file mode 100644 index 0000000000..89666f2f4f --- /dev/null +++ b/help/en/doDeclareVariables.xml @@ -0,0 +1,154 @@ + + + +
+ + + + + + + + +
+ +
+ + + + + + + + +
+
+ + + + + + + + + + + Every time this block is called, it makes a new + temporary variable + + + + . + + + Click (don't drag) to change name. + + +

+ Script variables don't clutter up your + palette, and you can be sure no other block + changes their value. This works for scripting + area scripts, too, not just custom blocks. +

+
+
+ + + + +

Object Oriented Programming:

+

+ + If a reporter reports a script, and that script uses a + script variable created outside the reported script (such + as the use of + + + + in the script that + + + + reports) then the script variable isn't temporary! + +

+ + + + 1 + 2 + + +
+
+
+
diff --git a/help/en/doDeleteAttr.png b/help/en/doDeleteAttr.png new file mode 100755 index 0000000000..083b038b55 Binary files /dev/null and b/help/en/doDeleteAttr.png differ diff --git a/help/en/doDeleteAttr.xml b/help/en/doDeleteAttr.xml new file mode 100644 index 0000000000..5a5467ef99 --- /dev/null +++ b/help/en/doDeleteAttr.xml @@ -0,0 +1,130 @@ + + + + +
+ Share a property with your parent. + \n(This only works for clones.) +
+ + + + +

BEFORE

+ + + + + + + + + + + + + + +
+ +

Run

+ +
+ +

AFTER

+ + + + + + + + Pale background in palette for + inherited property. + + + + + + + + + + + + + +
+
+ +
+
+ + + +

Inheritable properties include these:

+ + + sprite-local variable + x position + y position + direction + size + costumes + costume # + sounds + scripts + + + + + +

(and more... See Reference Manual Chapter VII.)

+
+ +

+ You can also control inheritance through the user + user interface. Right-click on a shareable thing in the + palette and see this: +

+ + + + + help... + hide + ☐ inherited + + + + Click to inherit + + +
+
+
+
diff --git a/help/en/doDeleteAttr_clones.png b/help/en/doDeleteAttr_clones.png new file mode 100644 index 0000000000..078a4bc15a Binary files /dev/null and b/help/en/doDeleteAttr_clones.png differ diff --git a/help/en/doDeleteFromList.png b/help/en/doDeleteFromList.png new file mode 100755 index 0000000000..d666057f1d Binary files /dev/null and b/help/en/doDeleteFromList.png differ diff --git a/help/en/doDeleteFromList.xml b/help/en/doDeleteFromList.xml new file mode 100644 index 0000000000..198e39e24a --- /dev/null +++ b/help/en/doDeleteFromList.xml @@ -0,0 +1,76 @@ + + + + + + + + + + Says the last item from the list + Deletes the last item from the list + + + + +

Before:

+ +
+ +

After:

+ +
+
+
+
+ + +

+ You can specify the number of the item you want to delete. + For example: +

+ +

+ To delete the last item in the list, choose "last" from the + dropdown menu: +

+ +

+ You can also choose to delete everything in the list: +

+ +
+
+
diff --git a/help/en/doDeleteFromList_supplies_after.png b/help/en/doDeleteFromList_supplies_after.png new file mode 100644 index 0000000000..a7f6aeae22 Binary files /dev/null and b/help/en/doDeleteFromList_supplies_after.png differ diff --git a/help/en/doDeleteFromList_supplies_before.png b/help/en/doDeleteFromList_supplies_before.png new file mode 100644 index 0000000000..d4d61e0723 Binary files /dev/null and b/help/en/doDeleteFromList_supplies_before.png differ diff --git a/help/en/doFaceTowards.png b/help/en/doFaceTowards.png new file mode 100644 index 0000000000..0ee1c41e83 Binary files /dev/null and b/help/en/doFaceTowards.png differ diff --git a/help/en/doFaceTowards.xml b/help/en/doFaceTowards.xml new file mode 100644 index 0000000000..be9bec2443 --- /dev/null +++ b/help/en/doFaceTowards.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + random position + mouse-pointer + center + + Sprite(2) + + + + Point the sprite towards... + anywhere on the stage + where the mouse is pointing + the point (0, 0) + another sprite's position + + + + + + Or drop an (x,y) position on the input slot + + + + + diff --git a/help/en/doForEach.png b/help/en/doForEach.png new file mode 100755 index 0000000000..3699d9e412 Binary files /dev/null and b/help/en/doForEach.png differ diff --git a/help/en/doForEach.xml b/help/en/doForEach.xml new file mode 100644 index 0000000000..6590e45184 --- /dev/null +++ b/help/en/doForEach.xml @@ -0,0 +1,80 @@ + + + + +
Do something for each item of a list.
+ + + + + + + + + + + + + + + +

+ There are two equivalent ways to represent the list item + inside the script. They're equally good; different people + have their own preference. +

+
+
+
+ + + + + +
diff --git a/help/en/doForEach_alonzo.png b/help/en/doForEach_alonzo.png new file mode 100644 index 0000000000..7455b109bd Binary files /dev/null and b/help/en/doForEach_alonzo.png differ diff --git a/help/en/doForever.png b/help/en/doForever.png new file mode 100755 index 0000000000..0ac6ff1926 Binary files /dev/null and b/help/en/doForever.png differ diff --git a/help/en/doForever.xml b/help/en/doForever.xml new file mode 100644 index 0000000000..c6a01dca08 --- /dev/null +++ b/help/en/doForever.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + +

Keep doing this forever

+
+
+
+
+
diff --git a/help/en/doGlide.png b/help/en/doGlide.png new file mode 100644 index 0000000000..33c90fc589 Binary files /dev/null and b/help/en/doGlide.png differ diff --git a/help/en/doGlide.xml b/help/en/doGlide.xml new file mode 100644 index 0000000000..1dafb9054d --- /dev/null +++ b/help/en/doGlide.xml @@ -0,0 +1,29 @@ + + + + + + + + + + Move smoothly to this point + (Larger numbers make it go slower) + + + + + + diff --git a/help/en/doGlide_stage.png b/help/en/doGlide_stage.png new file mode 100644 index 0000000000..c5398b7a3a Binary files /dev/null and b/help/en/doGlide_stage.png differ diff --git a/help/en/doGotoObject.png b/help/en/doGotoObject.png new file mode 100755 index 0000000000..7a9d6b13af Binary files /dev/null and b/help/en/doGotoObject.png differ diff --git a/help/en/doGotoObject.xml b/help/en/doGotoObject.xml new file mode 100644 index 0000000000..852170bce2 --- /dev/null +++ b/help/en/doGotoObject.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + random position + mouse-pointer + center + + Sprite(2) + + + + Move the sprite to... + anywhere on the stage + where the mouse is pointing + the point (0, 0) + another sprite's position + + + + + + Or drop an (x,y) position on the input slot + + + + + diff --git a/help/en/doHideVar.png b/help/en/doHideVar.png new file mode 100755 index 0000000000..689d62f78e Binary files /dev/null and b/help/en/doHideVar.png differ diff --git a/help/en/doHideVar.xml b/help/en/doHideVar.xml new file mode 100644 index 0000000000..2854782243 --- /dev/null +++ b/help/en/doHideVar.xml @@ -0,0 +1,43 @@ + + + + + + + + + + Hides a variable monitor on the stage + + + + + + Shows a variable monitor on the stage + + + + +

Hide variable:

+ +
+ +

Show variable:

+ +
+
+
+
+
diff --git a/help/en/doHideVar_stage1.png b/help/en/doHideVar_stage1.png new file mode 100644 index 0000000000..ec6fa04d38 Binary files /dev/null and b/help/en/doHideVar_stage1.png differ diff --git a/help/en/doHideVar_stage2.png b/help/en/doHideVar_stage2.png new file mode 100644 index 0000000000..c889639560 Binary files /dev/null and b/help/en/doHideVar_stage2.png differ diff --git a/help/en/doIf.png b/help/en/doIf.png new file mode 100755 index 0000000000..5297cd4b25 Binary files /dev/null and b/help/en/doIf.png differ diff --git a/help/en/doIf.xml b/help/en/doIf.xml new file mode 100644 index 0000000000..ac3dfcbc84 --- /dev/null +++ b/help/en/doIf.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + Keep checking: + If this is true + Then do this + + + + + diff --git a/help/en/doIfElse.png b/help/en/doIfElse.png new file mode 100755 index 0000000000..cc244ba54e Binary files /dev/null and b/help/en/doIfElse.png differ diff --git a/help/en/doIfElse.xml b/help/en/doIfElse.xml new file mode 100644 index 0000000000..61301c8177 --- /dev/null +++ b/help/en/doIfElse.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + Keep checking: + If this is true + Then do this + Otherwise do this + + + + + diff --git a/help/en/doInsertInList.png b/help/en/doInsertInList.png new file mode 100755 index 0000000000..87b0f87279 Binary files /dev/null and b/help/en/doInsertInList.png differ diff --git a/help/en/doInsertInList.xml b/help/en/doInsertInList.xml new file mode 100644 index 0000000000..5f140ac71d --- /dev/null +++ b/help/en/doInsertInList.xml @@ -0,0 +1,75 @@ + + + + + + + + + + When the lamp sprite is clicked + + Insert the item "lamp" at the first place in the list + + + + + +

Before:

+ +
+ +

After:

+ +
+
+
+
+ + + + + + + Inserts item at the specified place in the list + + + + + + + + Inserts item at a random place in the list + + + + + +
diff --git a/help/en/doInsertInList_my_list_after.png b/help/en/doInsertInList_my_list_after.png new file mode 100644 index 0000000000..abf06acd05 Binary files /dev/null and b/help/en/doInsertInList_my_list_after.png differ diff --git a/help/en/doInsertInList_my_list_before.png b/help/en/doInsertInList_my_list_before.png new file mode 100644 index 0000000000..124b4a3121 Binary files /dev/null and b/help/en/doInsertInList_my_list_before.png differ diff --git a/help/en/doPauseAll.png b/help/en/doPauseAll.png new file mode 100644 index 0000000000..bce2ea364e Binary files /dev/null and b/help/en/doPauseAll.png differ diff --git a/help/en/doPauseAll.xml b/help/en/doPauseAll.xml new file mode 100644 index 0000000000..8e084f7b7e --- /dev/null +++ b/help/en/doPauseAll.xml @@ -0,0 +1,44 @@ + + + + +
Pause all running scripts.
+ + +

+ + Running this block is like pushing the pause button + + + + in the top right corner of the screen. It pauses all + running scripts until you push the pause button (which + will have turned into a play button + + + ). +

+
+
+ + +

+ The main purpose of this block is for use in debugging, as a + way to set a breakpoint in a script. +

+ + + +
+
+
diff --git a/help/en/doPauseAll_pause.png b/help/en/doPauseAll_pause.png new file mode 100644 index 0000000000..95584458d4 Binary files /dev/null and b/help/en/doPauseAll_pause.png differ diff --git a/help/en/doPauseAll_play.png b/help/en/doPauseAll_play.png new file mode 100644 index 0000000000..e4ca726f65 Binary files /dev/null and b/help/en/doPauseAll_play.png differ diff --git a/help/en/doPlayNote.png b/help/en/doPlayNote.png new file mode 100755 index 0000000000..631402aa6d Binary files /dev/null and b/help/en/doPlayNote.png differ diff --git a/help/en/doPlayNote.xml b/help/en/doPlayNote.xml new file mode 100644 index 0000000000..403b99d9d9 --- /dev/null +++ b/help/en/doPlayNote.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + Repeat 3 times: + Play these three notes + + + + + + + + + + + Choose the note from the dropdown keyboard + + + + + + + Or type in a number from 0 to 127 (60 is middle C) + + + +

+ + Note: the length of a beat can be set with + + +

+
+
+
diff --git a/help/en/doPlayNote_piano.png b/help/en/doPlayNote_piano.png new file mode 100644 index 0000000000..abc4f3a7c0 Binary files /dev/null and b/help/en/doPlayNote_piano.png differ diff --git a/help/en/doPlaySoundAtRate.png b/help/en/doPlaySoundAtRate.png new file mode 100755 index 0000000000..596abb59f6 Binary files /dev/null and b/help/en/doPlaySoundAtRate.png differ diff --git a/help/en/doPlaySoundAtRate.xml b/help/en/doPlaySoundAtRate.xml new file mode 100644 index 0000000000..dfd2161b8f --- /dev/null +++ b/help/en/doPlaySoundAtRate.xml @@ -0,0 +1,35 @@ + + + + + + +

+ A higher sampling rate will take less time to finish the + sound, but will make it higher pitched (squeakier). +

+

+ Similarly, a lower sampling rate will slow down the sound, + but also make it lower pitched (deeper). +

+
+
+ + +

+ Most sounds have a natural sampling rate of 44100 Hz (44.1 + kHz), because that's the rate at which CDs are made. +

+

+ The highest pitch that can be included in a sound is just + under half the sampling rate, so CDs can reproduce up to 20 + kHz, which is about the limit of human hearing. +

+
+
+
diff --git a/help/en/doPlaySoundUntilDone.png b/help/en/doPlaySoundUntilDone.png new file mode 100755 index 0000000000..0b6ea7a0fc Binary files /dev/null and b/help/en/doPlaySoundUntilDone.png differ diff --git a/help/en/doPlaySoundUntilDone.xml b/help/en/doPlaySoundUntilDone.xml new file mode 100644 index 0000000000..4c947edc9f --- /dev/null +++ b/help/en/doPlaySoundUntilDone.xml @@ -0,0 +1,61 @@ + + + + + + + + + + Whenever space key is pressed + Play the entire sound + And then do this + + + + + + + + + + + Starts playing a sound and continues to the next + block immediately + + + + + + + + Waits until the sound is finished playing before + continuing to the next block + + + + + + diff --git a/help/en/doRepeat.png b/help/en/doRepeat.png new file mode 100755 index 0000000000..169cb26b81 Binary files /dev/null and b/help/en/doRepeat.png differ diff --git a/help/en/doRepeat.xml b/help/en/doRepeat.xml new file mode 100644 index 0000000000..4762a0443d --- /dev/null +++ b/help/en/doRepeat.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + +

Repeat this 10 times

+
+
+
+
+
diff --git a/help/en/doReplaceInList.png b/help/en/doReplaceInList.png new file mode 100755 index 0000000000..afc384dcc3 Binary files /dev/null and b/help/en/doReplaceInList.png differ diff --git a/help/en/doReplaceInList.xml b/help/en/doReplaceInList.xml new file mode 100644 index 0000000000..f388034a22 --- /dev/null +++ b/help/en/doReplaceInList.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + Replace item 1 in the list with the current score + + + + + +

Before:

+ +
+ +

After:

+ +
+
+
+
+ + +

You can choose where in a list to put an item. For example:

+ + + + Replaces item 2 in the list + + + + + + Replaces last item in the list + + +
+
+
diff --git a/help/en/doReplaceInList_scoreboard_after.png b/help/en/doReplaceInList_scoreboard_after.png new file mode 100644 index 0000000000..a0b711a582 Binary files /dev/null and b/help/en/doReplaceInList_scoreboard_after.png differ diff --git a/help/en/doReplaceInList_scoreboard_before.png b/help/en/doReplaceInList_scoreboard_before.png new file mode 100644 index 0000000000..681d5cf152 Binary files /dev/null and b/help/en/doReplaceInList_scoreboard_before.png differ diff --git a/help/en/doReport.png b/help/en/doReport.png new file mode 100755 index 0000000000..30d8c7763d Binary files /dev/null and b/help/en/doReport.png differ diff --git a/help/en/doReport.xml b/help/en/doReport.xml new file mode 100644 index 0000000000..3526855108 --- /dev/null +++ b/help/en/doReport.xml @@ -0,0 +1,116 @@ + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + +
+
+ + + +
Report a value from a custom block to its caller.
+ + + + + + + If this + + + runs because the number is negative, then that + ends the custom block, and so + + + + this + + + block (or whatever else comes later in the + block's script) doesn't happen. + + + + + + + + 7.5 + + + + + + + +

+ + + works for predicate custom blocks too; just drag a + hexagonal true/false reporter into its input slot. + +

+
+
+
diff --git a/help/en/doResetTimer.png b/help/en/doResetTimer.png new file mode 100644 index 0000000000..d0f9f560b3 Binary files /dev/null and b/help/en/doResetTimer.png differ diff --git a/help/en/doResetTimer.xml b/help/en/doResetTimer.xml new file mode 100644 index 0000000000..02aa97986e --- /dev/null +++ b/help/en/doResetTimer.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + Set timer to 0 + Give Sprite(2) a lead of 5 seconds + And then chase after it + + + + + diff --git a/help/en/doRest.png b/help/en/doRest.png new file mode 100755 index 0000000000..9494b43f23 Binary files /dev/null and b/help/en/doRest.png differ diff --git a/help/en/doRest.xml b/help/en/doRest.xml new file mode 100644 index 0000000000..c03b6f3383 --- /dev/null +++ b/help/en/doRest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + Play two notes + Rest (play nothing) + Play another note + + + + + diff --git a/help/en/doSayFor.png b/help/en/doSayFor.png new file mode 100755 index 0000000000..ab199386b0 Binary files /dev/null and b/help/en/doSayFor.png differ diff --git a/help/en/doSayFor.xml b/help/en/doSayFor.xml new file mode 100644 index 0000000000..f2b45862b7 --- /dev/null +++ b/help/en/doSayFor.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + Show "Hello there!" in a voice bubble for 2 seconds + + + + + + +

Now

+
+ + +

2 seconds later

+
+
+
+
+
diff --git a/help/en/doSayFor_cat_after.png b/help/en/doSayFor_cat_after.png new file mode 100644 index 0000000000..78089b5534 Binary files /dev/null and b/help/en/doSayFor_cat_after.png differ diff --git a/help/en/doSayFor_cat_before.png b/help/en/doSayFor_cat_before.png new file mode 100644 index 0000000000..12c2dc1ada Binary files /dev/null and b/help/en/doSayFor_cat_before.png differ diff --git a/help/en/doSetGlobalFlag.png b/help/en/doSetGlobalFlag.png new file mode 100644 index 0000000000..10b49b0b59 Binary files /dev/null and b/help/en/doSetGlobalFlag.png differ diff --git a/help/en/doSetGlobalFlag.xml b/help/en/doSetGlobalFlag.xml new file mode 100644 index 0000000000..ad5408a625 --- /dev/null +++ b/help/en/doSetGlobalFlag.xml @@ -0,0 +1,71 @@ + + + + +
Set global flag.
+ + + + + + + + turbo mode + flat line ends + video capture + mirror video + + + + + + + + +

+ + Set to true or false the value of the chosen setting from + the settings menu ( + + + ). +

+
+
+ + +

+ (Note: The particular settings available in the menu of this + block are just the ones Jens has needed for some project of + his. If you'd like to be able to read and set all the + settings in your project, load the “Provide getters and + setters for all GUI controls” library.) +

+ + “Anything you can do from the GUI, you should be able to do + from the programming language, and vice versa.” + — Mike Eisenberg, d. 3/12/2019 RIP + +
+
+
diff --git a/help/en/doSetGlobalFlag_settings.png b/help/en/doSetGlobalFlag_settings.png new file mode 100644 index 0000000000..92511aeff9 Binary files /dev/null and b/help/en/doSetGlobalFlag_settings.png differ diff --git a/help/en/doSetInstrument.png b/help/en/doSetInstrument.png new file mode 100755 index 0000000000..a998812631 Binary files /dev/null and b/help/en/doSetInstrument.png differ diff --git a/help/en/doSetInstrument.xml b/help/en/doSetInstrument.xml new file mode 100644 index 0000000000..c142acc437 --- /dev/null +++ b/help/en/doSetInstrument.xml @@ -0,0 +1,35 @@ + + + + +
Set sound (timbre) for notes.
+ + + + + + + (1) sine + (2) square + (3) sawtooth + (4) triangle + + + + + “Sine” is a pure, musical tone. The others sound more + computery. + + + + + +
diff --git a/help/en/doSetTempo.png b/help/en/doSetTempo.png new file mode 100755 index 0000000000..c2c9ff59b0 Binary files /dev/null and b/help/en/doSetTempo.png differ diff --git a/help/en/doSetTempo.xml b/help/en/doSetTempo.xml new file mode 100644 index 0000000000..71b2f7b7c3 --- /dev/null +++ b/help/en/doSetTempo.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + Set tempo to 60 beats per minute + Keep doing this: + Play a note for 0.5 beats + Increase the tempo by 20 beats + If the tempo is greater than 500 + Stop this script + + + + + + +

+ Tempo is the speed (bpm = beats per minute) at which Snap! notes + and drums play. The larger the tempo value, the faster the notes + and drums will play. +

+ + + + 0.5 beats = 0.5 seconds at 60 bpm + + + + + + 0.2 beats = 0.1 seconds at 120 bpm + + +
+
+
diff --git a/help/en/doSetVar.png b/help/en/doSetVar.png new file mode 100644 index 0000000000..91b96a038b Binary files /dev/null and b/help/en/doSetVar.png differ diff --git a/help/en/doSetVar.xml b/help/en/doSetVar.xml new file mode 100644 index 0000000000..4af410d43a --- /dev/null +++ b/help/en/doSetVar.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + When the green flag button is clicked + Set score to 0 (reset the score) + Keep doing this: + Point toward the mouse-pointer + Move + If you catch Sprite(2) + Increase your score + + + + + diff --git a/help/en/doSetVideoTransparency.png b/help/en/doSetVideoTransparency.png new file mode 100755 index 0000000000..befc955afd Binary files /dev/null and b/help/en/doSetVideoTransparency.png differ diff --git a/help/en/doSetVideoTransparency.xml b/help/en/doSetVideoTransparency.xml new file mode 100644 index 0000000000..aeb387b25f --- /dev/null +++ b/help/en/doSetVideoTransparency.xml @@ -0,0 +1,22 @@ + + + + +
Set the transparency of the video capture layer.
+ + +

+ The video layer is in front of the background, but behind + everything else. If, as usual, the stage background is solid + white, this just “ghosts” the video. If you have another + background, then dimming the video undims the background and + vice versa. Sprites and pen trails are always in front of the + video. +

+
+
+
diff --git a/help/en/doShowVar.png b/help/en/doShowVar.png new file mode 100755 index 0000000000..9acbb9f37d Binary files /dev/null and b/help/en/doShowVar.png differ diff --git a/help/en/doShowVar.xml b/help/en/doShowVar.xml new file mode 100644 index 0000000000..713b58cdb0 --- /dev/null +++ b/help/en/doShowVar.xml @@ -0,0 +1,43 @@ + + + + + + + + + + Hides a variable monitor on the stage + + + + + + Shows a variable monitor on the stage + + + + +

Hide variable:

+ +
+ +

Show variable:

+ +
+
+
+
+
diff --git a/help/en/doStamp.png b/help/en/doStamp.png new file mode 100755 index 0000000000..23124b5c40 Binary files /dev/null and b/help/en/doStamp.png differ diff --git a/help/en/doStamp.xml b/help/en/doStamp.xml new file mode 100644 index 0000000000..f94d319f15 --- /dev/null +++ b/help/en/doStamp.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + Clear all the stamps and lines + Repeat 9 times: + Move + Turn + + Stamp a print of your costume on the stage + + + + + + + diff --git a/help/en/doStamp_cats.png b/help/en/doStamp_cats.png new file mode 100644 index 0000000000..cab0d89c4a Binary files /dev/null and b/help/en/doStamp_cats.png differ diff --git a/help/en/doStopAllSounds.png b/help/en/doStopAllSounds.png new file mode 100644 index 0000000000..663142e721 Binary files /dev/null and b/help/en/doStopAllSounds.png differ diff --git a/help/en/doStopAllSounds.xml b/help/en/doStopAllSounds.xml new file mode 100644 index 0000000000..1bd88aebcc --- /dev/null +++ b/help/en/doStopAllSounds.xml @@ -0,0 +1,27 @@ + + + + + + + + + + When I receive this message + Stop playing all sounds + And start playing this sound + + + + + diff --git a/help/en/doStopThis.png b/help/en/doStopThis.png new file mode 100755 index 0000000000..014b3c0a95 Binary files /dev/null and b/help/en/doStopThis.png differ diff --git a/help/en/doStopThis.xml b/help/en/doStopThis.xml new file mode 100644 index 0000000000..097bbe9466 --- /dev/null +++ b/help/en/doStopThis.xml @@ -0,0 +1,79 @@ + + + + +
Stop some or all running scripts.
+ + + + + + + + all + this script + this block + all but this script + other scripts in sprite + + + + + + stop all: like pushing the red + + button. + + + stop this script: stops the top-level script even if + this block is inside a custom block definition. + + + stop this block: stops the innermost call to the + custom block that's running now (maybe leaving outer + recursive calls still running). + + + all but this script: stops scripts of all sprites. + + + other scripts in sprite: stops scripts in this sprite + only. + + + + + + + +

+ This block changes shape depending on the option selected. + All, this script, and this block stop the script containing + the block, so no other block can go beneath it. (In Scratch + terms, this is a “cap block.”) The bottom two options allow + this script to keep running, so it has a tab at the bottom. + (It's a “stack block.”) +

+ + + + +
+
+
diff --git a/help/en/doStopThis_stop.png b/help/en/doStopThis_stop.png new file mode 100644 index 0000000000..2dd9678c54 Binary files /dev/null and b/help/en/doStopThis_stop.png differ diff --git a/help/en/doSwitchToCostume.png b/help/en/doSwitchToCostume.png new file mode 100644 index 0000000000..b4d11dbf16 Binary files /dev/null and b/help/en/doSwitchToCostume.png differ diff --git a/help/en/doSwitchToCostume.xml b/help/en/doSwitchToCostume.xml new file mode 100644 index 0000000000..847c1767f6 --- /dev/null +++ b/help/en/doSwitchToCostume.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + Keep doing this: + Switch costume to Bird1 + Wait 0.5 secs + Switch costume to Bird2 + Wait 0.5 secs + + + + + + + +

+ You can refer to a costume by name or by number. For example: +

+ + + + +

+ You can also use an actual computed costume: +

+ +
+
+
diff --git a/help/en/doSwitchToCostume_birds.png b/help/en/doSwitchToCostume_birds.png new file mode 100644 index 0000000000..847d6404f9 Binary files /dev/null and b/help/en/doSwitchToCostume_birds.png differ diff --git a/help/en/doTellTo.png b/help/en/doTellTo.png new file mode 100644 index 0000000000..370e0619a6 Binary files /dev/null and b/help/en/doTellTo.png differ diff --git a/help/en/doTellTo.xml b/help/en/doTellTo.xml new file mode 100644 index 0000000000..b4f3bff7e9 --- /dev/null +++ b/help/en/doTellTo.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + Tell a particular other sprite to show itself. + + + + + + + + + + + + + + + Tell all sprites except myself to move to the + center of the stage. (Each sprite is used, one + at a time, to fill the empty slot highlighted in + green.) + + + + + + + +

+ The script is run in the environment of the other object, so + it uses that object's local variables and methods. If you + want to use one of the sender's variables inside the script, + leave an empty input slot in the script, click the right + arrowhead at the end of the TELL block, and use the sender's + variable as input to TELL. +

+ + + + + + + + + + + + + + In this example, "his variable" is defined in + Sprite(2), so it can be used inside the script. "My + variable" is defined in the sending sprite, so it + can't be used inside the script. Instead it is used + as input to TELL, which fills the empty slot in the + MOVE block with it. + +
+
+
diff --git a/help/en/doThink.png b/help/en/doThink.png new file mode 100644 index 0000000000..a93667b3a3 Binary files /dev/null and b/help/en/doThink.png differ diff --git a/help/en/doThink.xml b/help/en/doThink.xml new file mode 100644 index 0000000000..a01355d622 --- /dev/null +++ b/help/en/doThink.xml @@ -0,0 +1,48 @@ + + + + + + + + + + Show "I wonder..." in a think bubble + Wait a second + Remove think bubble + + + + + + + + + + +

+ You can type any phrase into + +

+

The words will appear above the sprite, in a think bubble.

+
+
+
diff --git a/help/en/doThinkFor.png b/help/en/doThinkFor.png new file mode 100644 index 0000000000..e7a7ae2ccc Binary files /dev/null and b/help/en/doThinkFor.png differ diff --git a/help/en/doThinkFor.xml b/help/en/doThinkFor.xml new file mode 100644 index 0000000000..0918f43ec1 --- /dev/null +++ b/help/en/doThinkFor.xml @@ -0,0 +1,35 @@ + + + + + + + + + + Show "I wonder..." in a think bubble for 2 seconds + + + + + +

Now

+
+ + +

2 seconds later

+
+
+
+
+
diff --git a/help/en/doThinkFor_alonzo2.png b/help/en/doThinkFor_alonzo2.png new file mode 100644 index 0000000000..ea0cb7955f Binary files /dev/null and b/help/en/doThinkFor_alonzo2.png differ diff --git a/help/en/doThink_alonzo1.png b/help/en/doThink_alonzo1.png new file mode 100644 index 0000000000..c2e0ee61ba Binary files /dev/null and b/help/en/doThink_alonzo1.png differ diff --git a/help/en/doThink_alonzo2.png b/help/en/doThink_alonzo2.png new file mode 100644 index 0000000000..c485e61d9f Binary files /dev/null and b/help/en/doThink_alonzo2.png differ diff --git a/help/en/doUntil.png b/help/en/doUntil.png new file mode 100755 index 0000000000..ed136a6006 Binary files /dev/null and b/help/en/doUntil.png differ diff --git a/help/en/doUntil.xml b/help/en/doUntil.xml new file mode 100644 index 0000000000..e73f3a90ff --- /dev/null +++ b/help/en/doUntil.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + Hello + + + + Until this happens + Do this + Then do this + + + + + +

Before

+
+ + +

After

+
+
+
+
+
diff --git a/help/en/doUntil_sprites1.png b/help/en/doUntil_sprites1.png new file mode 100644 index 0000000000..99e1446d91 Binary files /dev/null and b/help/en/doUntil_sprites1.png differ diff --git a/help/en/doUntil_sprites2.png b/help/en/doUntil_sprites2.png new file mode 100644 index 0000000000..2f2544ac75 Binary files /dev/null and b/help/en/doUntil_sprites2.png differ diff --git a/help/en/doWait.png b/help/en/doWait.png new file mode 100755 index 0000000000..d4e7a9727f Binary files /dev/null and b/help/en/doWait.png differ diff --git a/help/en/doWait.xml b/help/en/doWait.xml new file mode 100644 index 0000000000..77ba97f773 --- /dev/null +++ b/help/en/doWait.xml @@ -0,0 +1,31 @@ + + + + + + + + + + Moves + Does nothing for 1 second + Moves again + + + + + diff --git a/help/en/doWaitUntil.png b/help/en/doWaitUntil.png new file mode 100644 index 0000000000..df9e786666 Binary files /dev/null and b/help/en/doWaitUntil.png differ diff --git a/help/en/doWaitUntil.xml b/help/en/doWaitUntil.xml new file mode 100644 index 0000000000..fdffb00b42 --- /dev/null +++ b/help/en/doWaitUntil.xml @@ -0,0 +1,51 @@ + + + + + + + + + + Wait until this happens + Then do this + + + + + + +

+ This whole stack will just run once. If you want + + + to keep checking, put the whole stack inside a forever + block. + +

+
+
+
diff --git a/help/en/doWarp.png b/help/en/doWarp.png new file mode 100755 index 0000000000..b500de497d Binary files /dev/null and b/help/en/doWarp.png differ diff --git a/help/en/doWarp.xml b/help/en/doWarp.xml new file mode 100644 index 0000000000..34f08efea7 --- /dev/null +++ b/help/en/doWarp.xml @@ -0,0 +1,63 @@ + + + + +
Run fast; don't draw intermediate steps.
+ + + + + + + + + + + + + + + +

+ Other scripts can't run until the warp is finished. +

+
+
+
+ + +

+ If your warped script has a bug and keeps running forever, + hold down the stop sign in the top right corner of the window + until it stops. +

+ +
+
+
diff --git a/help/en/doWarp_ide.png b/help/en/doWarp_ide.png new file mode 100644 index 0000000000..bb5d280b48 Binary files /dev/null and b/help/en/doWarp_ide.png differ diff --git a/help/en/doWarp_steps1.png b/help/en/doWarp_steps1.png new file mode 100644 index 0000000000..bdc9b27bd0 Binary files /dev/null and b/help/en/doWarp_steps1.png differ diff --git a/help/en/doWarp_steps2.png b/help/en/doWarp_steps2.png new file mode 100644 index 0000000000..8d8b926d73 Binary files /dev/null and b/help/en/doWarp_steps2.png differ diff --git a/help/en/doWearNextCostume.png b/help/en/doWearNextCostume.png new file mode 100755 index 0000000000..41532742f5 Binary files /dev/null and b/help/en/doWearNextCostume.png differ diff --git a/help/en/doWearNextCostume.xml b/help/en/doWearNextCostume.xml new file mode 100644 index 0000000000..d0cfc6beb3 --- /dev/null +++ b/help/en/doWearNextCostume.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + Keep doing this: + Change to the next costume on the list + Wait 0.5 seconds + + + + + + + + +

+ You can rearrange the order of the list by dragging and + dropping the costumes. +

+

+ When + + + gets to the end of the list, it goes back to the top + (not including the turtle shape). + +

+
+
+
+
diff --git a/help/en/doWearNextCostume_costumes.png b/help/en/doWearNextCostume_costumes.png new file mode 100644 index 0000000000..b5782d0238 Binary files /dev/null and b/help/en/doWearNextCostume_costumes.png differ diff --git a/help/en/down.png b/help/en/down.png new file mode 100755 index 0000000000..295d37fbe3 Binary files /dev/null and b/help/en/down.png differ diff --git a/help/en/down.xml b/help/en/down.xml new file mode 100644 index 0000000000..0a1034ff4c --- /dev/null +++ b/help/en/down.xml @@ -0,0 +1,24 @@ + + + + + + + + + + Start leaving a pen trail + Move + + + + + + diff --git a/help/en/down_cat.png b/help/en/down_cat.png new file mode 100644 index 0000000000..9605e3bbea Binary files /dev/null and b/help/en/down_cat.png differ diff --git a/help/en/evaluate.png b/help/en/evaluate.png new file mode 100755 index 0000000000..fafb46dd40 Binary files /dev/null and b/help/en/evaluate.png differ diff --git a/help/en/evaluate.xml b/help/en/evaluate.xml new file mode 100644 index 0000000000..f94f11a93b --- /dev/null +++ b/help/en/evaluate.xml @@ -0,0 +1,143 @@ + + + +
+ + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + +
+
+ + + + + + +
Call a reporter or predicate block.
+ + + + + + + The input variable function has the reporter to call. + + + + + + + + + + + + + +

+ The CALL block has a ring for its first input slot because it + expects a reporter or predicate as its input. Almost always, + though, you'll use a variable to provide the input value, as + in the example above. When you put a variable in a ringed + input slot, the ring disappears because it's the value of the + variable that gives the function to call. If you drag + anything but a variable into the ring, the ring remains + around the input: +

+ + + + 8 + + +
+
+
diff --git a/help/en/evaluate_list.png b/help/en/evaluate_list.png new file mode 100644 index 0000000000..2947c9b83e Binary files /dev/null and b/help/en/evaluate_list.png differ diff --git a/help/en/floodFill.png b/help/en/floodFill.png new file mode 100755 index 0000000000..49c679af54 Binary files /dev/null and b/help/en/floodFill.png differ diff --git a/help/en/floodFill.xml b/help/en/floodFill.xml new file mode 100644 index 0000000000..baed55fbd5 --- /dev/null +++ b/help/en/floodFill.xml @@ -0,0 +1,69 @@ + + + + +
Change the color of a solid-color area.
+ + + + + + + + + + + + + + + + + + + + + + +

+ Fill first determines the color of the stage pixel under the + sprite. Then it changes every adjacent pixel with that color + to be the current pen color. So it's important to pick the + pen up before moving to the inside of the region to be + colored. If the color under the sprite is the border color, + just the border will be filled. +

+
+
+
diff --git a/help/en/floodFill_stage1.png b/help/en/floodFill_stage1.png new file mode 100644 index 0000000000..f797693c93 Binary files /dev/null and b/help/en/floodFill_stage1.png differ diff --git a/help/en/floodFill_stage2.png b/help/en/floodFill_stage2.png new file mode 100644 index 0000000000..fb84f5ee13 Binary files /dev/null and b/help/en/floodFill_stage2.png differ diff --git a/help/en/fork.png b/help/en/fork.png new file mode 100755 index 0000000000..758d3eab68 Binary files /dev/null and b/help/en/fork.png differ diff --git a/help/en/fork.xml b/help/en/fork.xml new file mode 100644 index 0000000000..1be9519e4b --- /dev/null +++ b/help/en/fork.xml @@ -0,0 +1,57 @@ + + + + +
Run another script independently of this script.
+ + + + + + + + + + + + + + + + + The move-and-draw script runs in parallel with + the turn script. + + + + + + +
diff --git a/help/en/fork_turtle.png b/help/en/fork_turtle.png new file mode 100644 index 0000000000..3e056c853b Binary files /dev/null and b/help/en/fork_turtle.png differ diff --git a/help/en/forward.png b/help/en/forward.png new file mode 100755 index 0000000000..6285385c8d Binary files /dev/null and b/help/en/forward.png differ diff --git a/help/en/forward.xml b/help/en/forward.xml new file mode 100644 index 0000000000..eb6c4b1c68 --- /dev/null +++ b/help/en/forward.xml @@ -0,0 +1,35 @@ + + + + + + + + + + Move 10 steps + + + + + + + Move 10 steps in the opposite direction + + + + + + diff --git a/help/en/getCostumeIdx.png b/help/en/getCostumeIdx.png new file mode 100755 index 0000000000..b11f9abd23 Binary files /dev/null and b/help/en/getCostumeIdx.png differ diff --git a/help/en/getCostumeIdx.xml b/help/en/getCostumeIdx.xml new file mode 100644 index 0000000000..01c88b6911 --- /dev/null +++ b/help/en/getCostumeIdx.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + 2 + + + + + + Pick a random costume + If it's costume #1 + Play "meow" + If it's costume #2 + Play "bark" + + + + + diff --git a/help/en/getEffect.png b/help/en/getEffect.png new file mode 100755 index 0000000000..51a01d43de Binary files /dev/null and b/help/en/getEffect.png differ diff --git a/help/en/getEffect.xml b/help/en/getEffect.xml new file mode 100644 index 0000000000..2ada9dfa2c --- /dev/null +++ b/help/en/getEffect.xml @@ -0,0 +1,38 @@ + + + + +
Report the value of a costume effect.
+ + + + + + + Most effects have useful values between -100 and + 100, but not all. Experiment. + + + + + + + 50 + + + + +
diff --git a/help/en/getLastAnswer.png b/help/en/getLastAnswer.png new file mode 100644 index 0000000000..1fc18c47c4 Binary files /dev/null and b/help/en/getLastAnswer.png differ diff --git a/help/en/getLastAnswer.xml b/help/en/getLastAnswer.xml new file mode 100644 index 0000000000..0016e21b13 --- /dev/null +++ b/help/en/getLastAnswer.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + orange + + + + + + + Asks question and waits for person to type in an + answer + + If the answer is “apple” + Do this + If the answer is “orange” + Do this + + + + + + +

+ + asks a question and stores the keyboard input in + + . +

+

+ + If you want to save the current answer, you can store it + in a variable or list. For example: + + +

+
+
+
diff --git a/help/en/getLastMessage.png b/help/en/getLastMessage.png new file mode 100755 index 0000000000..db7cbc2a98 Binary files /dev/null and b/help/en/getLastMessage.png differ diff --git a/help/en/getLastMessage.xml b/help/en/getLastMessage.xml new file mode 100644 index 0000000000..e6bd9ff5a2 --- /dev/null +++ b/help/en/getLastMessage.xml @@ -0,0 +1,37 @@ + + + + +
Report the most recently broadcast message.
+ + + + + + + hi there + + + + + + +

+ This block is most useful in a script that starts with + +

+
+
+
diff --git a/help/en/getPan.png b/help/en/getPan.png new file mode 100755 index 0000000000..e1f91bf2d3 Binary files /dev/null and b/help/en/getPan.png differ diff --git a/help/en/getPan.xml b/help/en/getPan.xml new file mode 100644 index 0000000000..634979d87f --- /dev/null +++ b/help/en/getPan.xml @@ -0,0 +1,20 @@ + + + + +
Report stereo balance for sounds.
+ + +

+ 0 is normal. -100 is left channel only; 100 is right channel + only. +

+

+ Each sprite has its own balance, which can be inherited by + clones. +

+
+
+
diff --git a/help/en/getPenAttribute.png b/help/en/getPenAttribute.png new file mode 100755 index 0000000000..93a2628ce4 Binary files /dev/null and b/help/en/getPenAttribute.png differ diff --git a/help/en/getPenAttribute.xml b/help/en/getPenAttribute.xml new file mode 100644 index 0000000000..db28e43714 --- /dev/null +++ b/help/en/getPenAttribute.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + size + hue + saturation + brightness + transparency + + + + + from + + + + from + + + + + + + + + + + + diff --git a/help/en/getPenDown.png b/help/en/getPenDown.png new file mode 100755 index 0000000000..fbdc380fab Binary files /dev/null and b/help/en/getPenDown.png differ diff --git a/help/en/getPenDown.xml b/help/en/getPenDown.xml new file mode 100644 index 0000000000..1271a0948b --- /dev/null +++ b/help/en/getPenDown.xml @@ -0,0 +1,27 @@ + + + + +
Report true if sprite's pen is down.
+ + +

The sprite draws as it moves if its pen is down.

+

+ Use + + to put the pen down. +

+

+ Use + + to pick the pen up. +

+
+
+
diff --git a/help/en/getScale.png b/help/en/getScale.png new file mode 100755 index 0000000000..7ad620d5c6 Binary files /dev/null and b/help/en/getScale.png differ diff --git a/help/en/getScale.xml b/help/en/getScale.xml new file mode 100644 index 0000000000..884dc712a6 --- /dev/null +++ b/help/en/getScale.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + If size is greater than 200% + Then do this + + + + + + +

+ + + reports the % of the original size of the object. + +

+ + +

+ + To view the value of size, click the checkbox next to + the block + + + + + +

+
+

+ Note: There are limits to how small or how big you can make a + sprite. Experiment with different numbers to see how small or + big you can make it. +

+
+
+
diff --git a/help/en/getScale_watcher.png b/help/en/getScale_watcher.png new file mode 100644 index 0000000000..ba7ed5467e Binary files /dev/null and b/help/en/getScale_watcher.png differ diff --git a/help/en/getTempo.png b/help/en/getTempo.png new file mode 100755 index 0000000000..9167fcb077 Binary files /dev/null and b/help/en/getTempo.png differ diff --git a/help/en/getTempo.xml b/help/en/getTempo.xml new file mode 100644 index 0000000000..3f8aff549f --- /dev/null +++ b/help/en/getTempo.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + Set tempo to 60 beats per minute + Keep doing this: + Play a note for 0.5 beats + Increase the tempo by 20 beats + If the tempo is greater than 500 + Stop this script + + + + + + +

+ Tempo is the speed (bpm = beats per minute) at which Snap! notes + and drums play. The larger the tempo value, the faster the notes + and drums will play. +

+ + + + 0.5 beats = 0.5 seconds at 60 bpm + + + + + + 0.2 beats = 0.1 seconds at 120 bpm + + +
+
+
diff --git a/help/en/getTimer.png b/help/en/getTimer.png new file mode 100644 index 0000000000..eb840eff80 Binary files /dev/null and b/help/en/getTimer.png differ diff --git a/help/en/getTimer.xml b/help/en/getTimer.xml new file mode 100644 index 0000000000..87b7bf5eba --- /dev/null +++ b/help/en/getTimer.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + Set timer to 0 + Give Sprite(2) a lead of 5 seconds + And then chase after it + + + + + + + + +

+ To see the value of the timer, click the checkbox next to + the block. +

+ + + + +
+
+
+
diff --git a/help/en/getTimer_watcher.png b/help/en/getTimer_watcher.png new file mode 100644 index 0000000000..a75847c847 Binary files /dev/null and b/help/en/getTimer_watcher.png differ diff --git a/help/en/getVolume.png b/help/en/getVolume.png new file mode 100755 index 0000000000..8bb9fc83c6 Binary files /dev/null and b/help/en/getVolume.png differ diff --git a/help/en/getVolume.xml b/help/en/getVolume.xml new file mode 100644 index 0000000000..3f9cc22736 --- /dev/null +++ b/help/en/getVolume.xml @@ -0,0 +1,20 @@ + + + + +
Change volume for sounds.
+ + +

+ 100% is the maximum sound possible. + 50% is already quite soft! +

+

+ Each sprite has its own volume, which can be inherited by + clones. +

+
+
+
diff --git a/help/en/goBack.png b/help/en/goBack.png new file mode 100644 index 0000000000..7f0df6a2f6 Binary files /dev/null and b/help/en/goBack.png differ diff --git a/help/en/goBack.xml b/help/en/goBack.xml new file mode 100644 index 0000000000..4d13e8ae39 --- /dev/null +++ b/help/en/goBack.xml @@ -0,0 +1,34 @@ + + + + + + + + + +

Sprite1: Cake

+
+ +

+ + To make the candles look like they are on top of the + cake, the cake has to + + +

+
+ +
+

Sprites 2,3,4,5: Candles

+
+
+
diff --git a/help/en/goBack_after.png b/help/en/goBack_after.png new file mode 100644 index 0000000000..f105ed0208 Binary files /dev/null and b/help/en/goBack_after.png differ diff --git a/help/en/goBack_before.png b/help/en/goBack_before.png new file mode 100644 index 0000000000..408351fbcb Binary files /dev/null and b/help/en/goBack_before.png differ diff --git a/help/en/goToLayer.png b/help/en/goToLayer.png new file mode 100644 index 0000000000..210b1641b4 Binary files /dev/null and b/help/en/goToLayer.png differ diff --git a/help/en/goToLayer.xml b/help/en/goToLayer.xml new file mode 100644 index 0000000000..f5d18c3a59 --- /dev/null +++ b/help/en/goToLayer.xml @@ -0,0 +1,45 @@ + + + + + + + + +

Sprite1: Girl

+

Sprite2: Ball

+
+ +

+ + To make the girl look like she is holding the ball, + tell the ball to + + +

+ + + + + front + back + + + +
+ +
+
+
diff --git a/help/en/goToLayer_after.png b/help/en/goToLayer_after.png new file mode 100644 index 0000000000..1bb30d9026 Binary files /dev/null and b/help/en/goToLayer_after.png differ diff --git a/help/en/goToLayer_before.png b/help/en/goToLayer_before.png new file mode 100644 index 0000000000..ab0f4f3036 Binary files /dev/null and b/help/en/goToLayer_before.png differ diff --git a/help/en/gotoXY.png b/help/en/gotoXY.png new file mode 100755 index 0000000000..8f6ba0d5cc Binary files /dev/null and b/help/en/gotoXY.png differ diff --git a/help/en/gotoXY.xml b/help/en/gotoXY.xml new file mode 100644 index 0000000000..f1625da8ec --- /dev/null +++ b/help/en/gotoXY.xml @@ -0,0 +1,40 @@ + + + + + + + + + + Jump to the center of the stage + + + + + + +

+ You can use + + + to tell a sprite to jump to any location on the stage. + +

+
+
diff --git a/help/en/gotoXY_stage.png b/help/en/gotoXY_stage.png new file mode 100644 index 0000000000..9e41361e3e Binary files /dev/null and b/help/en/gotoXY_stage.png differ diff --git a/help/en/hide.png b/help/en/hide.png new file mode 100755 index 0000000000..587508a645 Binary files /dev/null and b/help/en/hide.png differ diff --git a/help/en/hide.xml b/help/en/hide.xml new file mode 100644 index 0000000000..46af4c6393 --- /dev/null +++ b/help/en/hide.xml @@ -0,0 +1,27 @@ + + + + + + + + + + Makes the sprite disappear + + + + + + Makes the sprite appear again + + + + + diff --git a/help/en/joinwords.png b/help/en/joinwords.png new file mode 100755 index 0000000000..1f9d1b75d4 Binary files /dev/null and b/help/en/joinwords.png differ diff --git a/help/en/joinwords.xml b/help/en/joinwords.xml new file mode 100644 index 0000000000..27e87d0343 --- /dev/null +++ b/help/en/joinwords.xml @@ -0,0 +1,89 @@ + + + + + + + +
Combine words into a sentence.
+ + + + + + The Night Before + + + + + + University of California + + + + + + +

+ This block is just like + + except that it puts spaces between inputs. +

+ + + + + Use the arrows to make more or fewer input slots. + + + +
+
+
diff --git a/help/en/list$arrowRightsentence.png b/help/en/list$arrowRightsentence.png new file mode 100755 index 0000000000..3959edb3d9 Binary files /dev/null and b/help/en/list$arrowRightsentence.png differ diff --git a/help/en/list$arrowRightsentence.xml b/help/en/list$arrowRightsentence.xml new file mode 100644 index 0000000000..027c10d52c --- /dev/null +++ b/help/en/list$arrowRightsentence.xml @@ -0,0 +1,94 @@ + + + + + + +
+ + + + + +
+
+ + + +
Convert a list of words into a sentence.
+ + + + + + + Build Your Own Blocks + + + + + +

+ Use + + to do something to every word in a sentence: +

+ + + + boys ears things + + +
+
+
diff --git a/help/en/newClone.png b/help/en/newClone.png new file mode 100644 index 0000000000..6b4b2bb901 Binary files /dev/null and b/help/en/newClone.png differ diff --git a/help/en/newClone.xml b/help/en/newClone.xml new file mode 100644 index 0000000000..03ef7ed428 --- /dev/null +++ b/help/en/newClone.xml @@ -0,0 +1,47 @@ + + + + + + +

+ + Report a new clone of the selected sprite, with the same + position, direction, costumes, sounds, local variables, + local blocks, and scripts. Most of these properties are + shared with the original, so that a change in the + original changes the clone, but not the other way around. + Temporary clones are deleted when the stop button + + + is pressed. +

+

+ + The clone will not be visible immediately because it is + in exactly the same position as the original! See the + + + + block for a way to change this. + +

+
+
+ + +

+ Note: Snap! clones are not copies of the sprite; they + actually share information, so a change in the original may + be seen in the clones. See the “Object Oriented Programming + with Sprites” chapter in the Snap! Reference Manual. +

+
+
+
diff --git a/help/en/playSound.png b/help/en/playSound.png new file mode 100755 index 0000000000..e1dfd8d16e Binary files /dev/null and b/help/en/playSound.png differ diff --git a/help/en/playSound.xml b/help/en/playSound.xml new file mode 100644 index 0000000000..c160f8090e --- /dev/null +++ b/help/en/playSound.xml @@ -0,0 +1,58 @@ + + + + + + + + + + Whenever space key is pressed + Play this sound + + + + + + +

+ If your computer has a microphone, you can record your own + sounds. +

+ + + +

Go to Sounds and click Record.

+
+ + +

+ Use this to record. Then click + +

+
+ + + + +

Choose your sound from the menu.

+
+
+
+
+
diff --git a/help/en/playSound_record.png b/help/en/playSound_record.png new file mode 100644 index 0000000000..348dd346e1 Binary files /dev/null and b/help/en/playSound_record.png differ diff --git a/help/en/playSound_save_button.png b/help/en/playSound_save_button.png new file mode 100644 index 0000000000..3ac6c22cc8 Binary files /dev/null and b/help/en/playSound_save_button.png differ diff --git a/help/en/playSound_sounds_tab.png b/help/en/playSound_sounds_tab.png new file mode 100644 index 0000000000..eeb321e946 Binary files /dev/null and b/help/en/playSound_sounds_tab.png differ diff --git a/help/en/pointer.png b/help/en/pointer.png new file mode 100644 index 0000000000..8acfa79004 Binary files /dev/null and b/help/en/pointer.png differ diff --git a/help/en/receiveCondition.png b/help/en/receiveCondition.png new file mode 100755 index 0000000000..a10a818acf Binary files /dev/null and b/help/en/receiveCondition.png differ diff --git a/help/en/receiveCondition.xml b/help/en/receiveCondition.xml new file mode 100644 index 0000000000..2d13236328 --- /dev/null +++ b/help/en/receiveCondition.xml @@ -0,0 +1,61 @@ + + + + +
Start script when any test is true.
+ + + + + + + + + + + + + + + +

+ Note: This generic hat block slows down Snap! more than the + specific hat blocks, because your script is always running, in + the equivalent of a FOREVER [IF...] loop. Therefore, to prevent + an inescapable slowdown, clicking the Stop button disables the + generic hat block tests until some other script is running. +

+

+ When a test is True, the script under the hat block is guaranteed + to start (but not necessarily to finish) before any other script + runs. +

+
+
+
diff --git a/help/en/receiveGo.png b/help/en/receiveGo.png new file mode 100755 index 0000000000..7b70bd9958 Binary files /dev/null and b/help/en/receiveGo.png differ diff --git a/help/en/receiveGo.xml b/help/en/receiveGo.xml new file mode 100644 index 0000000000..4d891bf295 --- /dev/null +++ b/help/en/receiveGo.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + When the green flag button is clicked + Do this + + + + + diff --git a/help/en/receiveInteraction.png b/help/en/receiveInteraction.png new file mode 100755 index 0000000000..877464f79f Binary files /dev/null and b/help/en/receiveInteraction.png differ diff --git a/help/en/receiveInteraction.xml b/help/en/receiveInteraction.xml new file mode 100644 index 0000000000..1fd893093a --- /dev/null +++ b/help/en/receiveInteraction.xml @@ -0,0 +1,48 @@ + + + + +
Start script when sprite is...
+ + + + + clicked + pressed + dropped + mouse-entered + mouse-departed + scrolled-up + scrolled-down + stopped + + + Clicked and then released + + Clicked, even before mouse button is released + + + Clicked, dragged (moved), and then released + + Entered by mouse, without clicking + + Entered and then left by mouse, without clicking + + + When mouse wheel is scrolled up or down while + hovering over this sprite + + + When scripts are stopped ( + + ) + + + + + +
diff --git a/help/en/receiveInteraction_stop.png b/help/en/receiveInteraction_stop.png new file mode 100644 index 0000000000..76041555c4 Binary files /dev/null and b/help/en/receiveInteraction_stop.png differ diff --git a/help/en/receiveKey.png b/help/en/receiveKey.png new file mode 100755 index 0000000000..da3f79e3aa Binary files /dev/null and b/help/en/receiveKey.png differ diff --git a/help/en/receiveKey.xml b/help/en/receiveKey.xml new file mode 100644 index 0000000000..edf7c17a6d --- /dev/null +++ b/help/en/receiveKey.xml @@ -0,0 +1,27 @@ + + + + + + + + + + Whenever this key is pressed + Do this + + + + + diff --git a/help/en/receiveMessage.png b/help/en/receiveMessage.png new file mode 100755 index 0000000000..aee2d1734d Binary files /dev/null and b/help/en/receiveMessage.png differ diff --git a/help/en/receiveMessage.xml b/help/en/receiveMessage.xml new file mode 100644 index 0000000000..3394fef26f --- /dev/null +++ b/help/en/receiveMessage.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + Whenever the message "jump" is broadcast + + Do this + + + + + + +

+ + waits for the message + +

+
+
+
diff --git a/help/en/receiveOnClone.png b/help/en/receiveOnClone.png new file mode 100755 index 0000000000..4bebdfdbc8 Binary files /dev/null and b/help/en/receiveOnClone.png differ diff --git a/help/en/receiveOnClone.xml b/help/en/receiveOnClone.xml new file mode 100644 index 0000000000..e19b2974d5 --- /dev/null +++ b/help/en/receiveOnClone.xml @@ -0,0 +1,86 @@ + + + + +
Clone initialization script
+ + + + + + + +

+ (because the original and all three copies are in the + same place and the same color) +

+
+
+
+ + + + + + + + + + + + + +

+ Note: Snap! clones are not copies of the sprite; they + actually share information, so a change in the original may + be seen in the clones. See the “Object Oriented Programming + with Sprites” chapter in the Snap! Reference Manual. +

+
+
+
diff --git a/help/en/receiveOnClone_turtles1.png b/help/en/receiveOnClone_turtles1.png new file mode 100644 index 0000000000..8abff9c299 Binary files /dev/null and b/help/en/receiveOnClone_turtles1.png differ diff --git a/help/en/receiveOnClone_turtles2.png b/help/en/receiveOnClone_turtles2.png new file mode 100644 index 0000000000..4e2787effb Binary files /dev/null and b/help/en/receiveOnClone_turtles2.png differ diff --git a/help/en/reifyPredicate.png b/help/en/reifyPredicate.png new file mode 100755 index 0000000000..bac5460686 Binary files /dev/null and b/help/en/reifyPredicate.png differ diff --git a/help/en/reifyPredicate.xml b/help/en/reifyPredicate.xml new file mode 100644 index 0000000000..ae97ccb8d6 --- /dev/null +++ b/help/en/reifyPredicate.xml @@ -0,0 +1,152 @@ + + + + + + + + +
Reports a script or block as a value.
+ + + + + + + + 5 + + + + + + + + + + + + + + + + + + + + + + All rings are oval on the outside because a ring + reports a value. + + + The inside shape tells whether this ring expects + a command script, a reporter, or a predicate + block. + + + + + + + + +

+ Some blocks have rings built in. These are input slots that + expect a script or block as the input value. +

+ + + + + This slot in the CALL block takes a reporter as the + input. + + + + + + + 8 + + +
+
+
diff --git a/help/en/reifyReporter.png b/help/en/reifyReporter.png new file mode 100755 index 0000000000..bac5460686 Binary files /dev/null and b/help/en/reifyReporter.png differ diff --git a/help/en/reifyReporter.xml b/help/en/reifyReporter.xml new file mode 100644 index 0000000000..ae97ccb8d6 --- /dev/null +++ b/help/en/reifyReporter.xml @@ -0,0 +1,152 @@ + + + + + + + + +
Reports a script or block as a value.
+ + + + + + + + 5 + + + + + + + + + + + + + + + + + + + + + + All rings are oval on the outside because a ring + reports a value. + + + The inside shape tells whether this ring expects + a command script, a reporter, or a predicate + block. + + + + + + + + +

+ Some blocks have rings built in. These are input slots that + expect a script or block as the input value. +

+ + + + + This slot in the CALL block takes a reporter as the + input. + + + + + + + 8 + + +
+
+
diff --git a/help/en/reifyScript.png b/help/en/reifyScript.png new file mode 100755 index 0000000000..bac5460686 Binary files /dev/null and b/help/en/reifyScript.png differ diff --git a/help/en/reifyScript.xml b/help/en/reifyScript.xml new file mode 100644 index 0000000000..ae97ccb8d6 --- /dev/null +++ b/help/en/reifyScript.xml @@ -0,0 +1,152 @@ + + + + + + + + +
Reports a script or block as a value.
+ + + + + + + + 5 + + + + + + + + + + + + + + + + + + + + + + All rings are oval on the outside because a ring + reports a value. + + + The inside shape tells whether this ring expects + a command script, a reporter, or a predicate + block. + + + + + + + + +

+ Some blocks have rings built in. These are input slots that + expect a script or block as the input value. +

+ + + + + This slot in the CALL block takes a reporter as the + input. + + + + + + + 8 + + +
+
+
diff --git a/help/en/removeClone.png b/help/en/removeClone.png new file mode 100644 index 0000000000..8d3fdbf69c Binary files /dev/null and b/help/en/removeClone.png differ diff --git a/help/en/removeClone.xml b/help/en/removeClone.xml new file mode 100644 index 0000000000..82eda587a1 --- /dev/null +++ b/help/en/removeClone.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + +

+ + Both the original sprite and the clone run the GO + script. The original moves down to the left; the + clone moves down to the right. Both sprites run + + + but only the clone is actually deleted. +

+
+
+ + +

+ Note: Snap! clones are not copies of the sprite; they + actually share information, so a change in the original may + be seen in the clones. See the “Object Oriented Programming + with Sprites” chapter in the Snap! Reference Manual. +

+
+
+
diff --git a/help/en/removeClone_stage.png b/help/en/removeClone_stage.png new file mode 100644 index 0000000000..7b73746b1f Binary files /dev/null and b/help/en/removeClone_stage.png differ diff --git a/help/en/reportAnd.png b/help/en/reportAnd.png new file mode 100755 index 0000000000..41e880a5b4 Binary files /dev/null and b/help/en/reportAnd.png differ diff --git a/help/en/reportAnd.xml b/help/en/reportAnd.xml new file mode 100644 index 0000000000..20d8ead438 --- /dev/null +++ b/help/en/reportAnd.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + If touching Sprite(2)'s white gloves + Then do this + + + + + diff --git a/help/en/reportAskFor.png b/help/en/reportAskFor.png new file mode 100755 index 0000000000..48f2ccf617 Binary files /dev/null and b/help/en/reportAskFor.png differ diff --git a/help/en/reportAskFor.xml b/help/en/reportAskFor.xml new file mode 100644 index 0000000000..dd2f87bc1c --- /dev/null +++ b/help/en/reportAskFor.xml @@ -0,0 +1,119 @@ + + + + +
Ask another object a question.
+ + +

Ask a particular sprite where it is:

+ + + + + + +

Ask all sprites except myself where they are:

+ + + + + + +

+ (Each sprite is used, one at a time, to fill the empty slot + highlighted in green.) +

+
+
+ + +

+ The expression is evaluated in the environment of the other + object, so it uses that object's local variables and methods. If + you want to use one of the sender's variables inside the script, + leave an empty input slot in the script, click the right + arrowhead at the end of the ASK, and use the sender's variable as + input to ASK. +

+ + + +

+ In this example, “its variable” is defined in Sprite(3), so + it can be used inside the expression. “My variable” is + defined in the asking sprite, so it can't be used inside the + expression. Instead it is used as input to ASK, which fills + the empty slot in the LIST block with it. +

+
+
+
diff --git a/help/en/reportAskFor_list1.png b/help/en/reportAskFor_list1.png new file mode 100644 index 0000000000..ae3853452b Binary files /dev/null and b/help/en/reportAskFor_list1.png differ diff --git a/help/en/reportAskFor_list2.png b/help/en/reportAskFor_list2.png new file mode 100644 index 0000000000..c8dfed2803 Binary files /dev/null and b/help/en/reportAskFor_list2.png differ diff --git a/help/en/reportAspect.png b/help/en/reportAspect.png new file mode 100755 index 0000000000..2ad5b88722 Binary files /dev/null and b/help/en/reportAspect.png differ diff --git a/help/en/reportAspect.xml b/help/en/reportAspect.xml new file mode 100644 index 0000000000..cb56f42ad8 --- /dev/null +++ b/help/en/reportAspect.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + hue + saturation + brightness + transparency + + sprites + + + + + The visible color at the chosen location. May come + from drawn lines, frontmost sprite (maybe this one.) + + + A list of all sprites at this point, whether in front + of or behind me, including myself. + + + + + + + + + + + + + + + + +

+ The value (color or sprites) is measured at the rotation + center of the given sprite. +

+ + + + + Instead of choosing from the right menu, you can drop + an (x,y) coordinate pair into that slot. + + + +
+
+
diff --git a/help/en/reportAspect_list.png b/help/en/reportAspect_list.png new file mode 100644 index 0000000000..a5bf16751b Binary files /dev/null and b/help/en/reportAspect_list.png differ diff --git a/help/en/reportAttributeOf.png b/help/en/reportAttributeOf.png new file mode 100755 index 0000000000..f2d8e1d212 Binary files /dev/null and b/help/en/reportAttributeOf.png differ diff --git a/help/en/reportAttributeOf.xml b/help/en/reportAttributeOf.xml new file mode 100644 index 0000000000..e014236984 --- /dev/null +++ b/help/en/reportAttributeOf.xml @@ -0,0 +1,93 @@ + + + + +
Report an attribute of an object.
+ + + + + + -84 + + + + (The attributes available in the left pulldown + are different for different objects, e.g., the + stage has no x position.) + + + + + + + + + + something + + + + +

+ If a sprite has a “for this sprite only” variable, it + will appear in the left pulldown, so one sprite can + examine the variables of another. +

+
+
+
+
+ + + + + + + Sprite(2) + + + + +

+ By putting a script in a grey ring + + + and dragging it over the left pulldown, you can even + let one sprite control the actions of another sprite! + +

+
+ +
+
+
diff --git a/help/en/reportAttributeOf_reporter.png b/help/en/reportAttributeOf_reporter.png new file mode 100644 index 0000000000..1aba42e57e Binary files /dev/null and b/help/en/reportAttributeOf_reporter.png differ diff --git a/help/en/reportAttributeOf_stage.png b/help/en/reportAttributeOf_stage.png new file mode 100644 index 0000000000..6109712bee Binary files /dev/null and b/help/en/reportAttributeOf_stage.png differ diff --git a/help/en/reportAudio.png b/help/en/reportAudio.png new file mode 100755 index 0000000000..86f9f643b2 Binary files /dev/null and b/help/en/reportAudio.png differ diff --git a/help/en/reportAudio.xml b/help/en/reportAudio.xml new file mode 100644 index 0000000000..1a2ea874f9 --- /dev/null +++ b/help/en/reportAudio.xml @@ -0,0 +1,74 @@ + + + + +
Report data from microphone.
+ + +

+ This block collects and analyzes a short (0.01 to 0.1 second) + burst of sound. +

+ + + + + volume + note + frequency + samples + sample rate + spectrum + resolution + + + + + The first three options report a single number + characterizing the sound as a whole average volume, + dominant note number, and frequency. + + + The next two options are time domain information: + a list of instantaneous volumes and a number + representing the number of samples per second + (sampling rate). + + + The last two options are frequency domain + information: a histogram of frequencies and the + number of buckets in the histogram. + + + +
+
+ + +

+ “Time domain” means that the list items are the instantaneous + volume at each moment, measured thousands of times per second. + “Frequency domain” means that the list items are the volume + over the entire burst of sound at each note frequency. +

+ + + +

Tuning fork (pure sine wave)

+
+ + +

Simple musical instrument with harmonics

+
+
+
+
+
diff --git a/help/en/reportAudio_instrument.png b/help/en/reportAudio_instrument.png new file mode 100644 index 0000000000..d9318c55a4 Binary files /dev/null and b/help/en/reportAudio_instrument.png differ diff --git a/help/en/reportAudio_tuning_fork.png b/help/en/reportAudio_tuning_fork.png new file mode 100644 index 0000000000..fc3560646a Binary files /dev/null and b/help/en/reportAudio_tuning_fork.png differ diff --git a/help/en/reportBoolean.png b/help/en/reportBoolean.png new file mode 100755 index 0000000000..430c53f532 Binary files /dev/null and b/help/en/reportBoolean.png differ diff --git a/help/en/reportBoolean.xml b/help/en/reportBoolean.xml new file mode 100644 index 0000000000..797d6346fa --- /dev/null +++ b/help/en/reportBoolean.xml @@ -0,0 +1,139 @@ + + + +
+ + + + + + + + + + 4 + + + +
+
+ + + + + + +
Reports “true” or “false.”
+ + + + + + Click the block to change the value. + + + + + + + + + + This says, “draw a square with side 200 steps, after + putting the pen down first.” + + + + + + + + This says, “draw a square with side 100 steps, and don't + put the pen down first.” + + + + + + + + + +

Programming style tip:

+ + + + + + + Instead of this + + + + + + you can just say this + + +
+
+
diff --git a/help/en/reportCDR.png b/help/en/reportCDR.png new file mode 100755 index 0000000000..25918ebdf7 Binary files /dev/null and b/help/en/reportCDR.png differ diff --git a/help/en/reportCDR.xml b/help/en/reportCDR.xml new file mode 100644 index 0000000000..3b295715ef --- /dev/null +++ b/help/en/reportCDR.xml @@ -0,0 +1,86 @@ + + + + +
Report all but first list item.
+ + + + + + + + + + + + +

+ + The new list shares structure with the old one; it's not + a copy. If the input list was made with the list reporter + blocks + + + + + then + + + is very fast; it doesn't have to copy the items or the + list structure. If you use list commands such as + + + + on a list, then it will be a a dynamic array rather than + a linked list, so this block has to convert to linked + form. + +

+

+ The list reporters are good for writing recursive list + reporters that build up a result list item by item. +

+
+
+
diff --git a/help/en/reportCDR_list.png b/help/en/reportCDR_list.png new file mode 100644 index 0000000000..f2f1c0d888 Binary files /dev/null and b/help/en/reportCDR_list.png differ diff --git a/help/en/reportCONS.png b/help/en/reportCONS.png new file mode 100755 index 0000000000..dac0688b00 Binary files /dev/null and b/help/en/reportCONS.png differ diff --git a/help/en/reportCONS.xml b/help/en/reportCONS.xml new file mode 100644 index 0000000000..3e8ff0182e --- /dev/null +++ b/help/en/reportCONS.xml @@ -0,0 +1,188 @@ + + + +
+ + + + + + + + + + + 1 + + 1 + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+
+ + + +
+ Report a list that extends another list with one new item. +
+ + + + + + + The list you want to extend + New item (can be anything!) + + + + + + + + + +

Note: The new list shares structure with the old one!

+ + + + + true + + +
+
+ + + + + + + + + is most useful in writing recursive reporters + like this one, to build up a list element by + element. + + + + + + + + + + + + + +
diff --git a/help/en/reportCONS_list1.png b/help/en/reportCONS_list1.png new file mode 100644 index 0000000000..52317397c0 Binary files /dev/null and b/help/en/reportCONS_list1.png differ diff --git a/help/en/reportCONS_list2.png b/help/en/reportCONS_list2.png new file mode 100644 index 0000000000..b399106f1c Binary files /dev/null and b/help/en/reportCONS_list2.png differ diff --git a/help/en/reportCallCC.png b/help/en/reportCallCC.png new file mode 100644 index 0000000000..22e7761629 Binary files /dev/null and b/help/en/reportCallCC.png differ diff --git a/help/en/reportCallCC.xml b/help/en/reportCallCC.xml new file mode 100644 index 0000000000..3e0a8ecb49 --- /dev/null +++ b/help/en/reportCallCC.xml @@ -0,0 +1,92 @@ + + + + +
Capture reporter continuation
+ + + + + + cont + + + + + + + 100 + + + + + + + + + + + + + + + + +

+ + Continuations are too complicated to explain in a help + screen, but they're used to invent control structures + such as the + + catch + and + throw + + tool blocks. Read the chapter in the Snap! Reference + Manual if you want to know more. + +

+
+
+
diff --git a/help/en/reportCallCC_turtle1.png b/help/en/reportCallCC_turtle1.png new file mode 100644 index 0000000000..ab761a234e Binary files /dev/null and b/help/en/reportCallCC_turtle1.png differ diff --git a/help/en/reportCallCC_turtle2.png b/help/en/reportCallCC_turtle2.png new file mode 100644 index 0000000000..a751b686ff Binary files /dev/null and b/help/en/reportCallCC_turtle2.png differ diff --git a/help/en/reportColorIsTouchingColor.png b/help/en/reportColorIsTouchingColor.png new file mode 100644 index 0000000000..6a4cccd56a Binary files /dev/null and b/help/en/reportColorIsTouchingColor.png differ diff --git a/help/en/reportColorIsTouchingColor.xml b/help/en/reportColorIsTouchingColor.xml new file mode 100644 index 0000000000..e0a92b6281 --- /dev/null +++ b/help/en/reportColorIsTouchingColor.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + Keep doing this: + + If the nose of the bee (color brown) touches the + center of the flower (color orange) + + Play a sound to show that it landed + + + + + + + + + + + + + + + Get the eye dropper by clicking in the square. + + + + + + + Use the eye dropper to click on the color you want. + + + + + + Color appears in square + + + + + diff --git a/help/en/reportColorIsTouchingColor_dropper.png b/help/en/reportColorIsTouchingColor_dropper.png new file mode 100644 index 0000000000..3c56c3e4a5 Binary files /dev/null and b/help/en/reportColorIsTouchingColor_dropper.png differ diff --git a/help/en/reportColorIsTouchingColor_not_touching.png b/help/en/reportColorIsTouchingColor_not_touching.png new file mode 100644 index 0000000000..cab2a53008 Binary files /dev/null and b/help/en/reportColorIsTouchingColor_not_touching.png differ diff --git a/help/en/reportColorIsTouchingColor_touching.png b/help/en/reportColorIsTouchingColor_touching.png new file mode 100644 index 0000000000..a87f9472d7 Binary files /dev/null and b/help/en/reportColorIsTouchingColor_touching.png differ diff --git a/help/en/reportDate.png b/help/en/reportDate.png new file mode 100755 index 0000000000..d07cbefa88 Binary files /dev/null and b/help/en/reportDate.png differ diff --git a/help/en/reportDate.xml b/help/en/reportDate.xml new file mode 100644 index 0000000000..9d1fab60cb --- /dev/null +++ b/help/en/reportDate.xml @@ -0,0 +1,70 @@ + + + + +
Report current date or time
+ + + + + year + month + date + day of week + hour + minute + seconds + time in milliseconds + + + Report current year, e.g., 2015 + Report month of year, Jan=1, Dec=12 + Report day number within month, 1-31 + Report day of week (Sun=0, Mon=1, ... Sat=6) + Report hour of day, 0-23 + Report minute within hour, 0-59 + Report second within minute, 0-59 + Report milliseconds since midnight, Jan 1, 1970 + + + + + + +

+ All reported values are numbers; you can write blocks to + convert week days or months into words. Note that date + numbers start at 1, as in conventional written notation + (7/20/2015 or 20-7-2015 for July 20th), but time numbers + start at 0, as in 24-hour clock notation (15:49:20 is 3:49pm + plus 20 seconds). +

+ + + + 5/25/2015 + + +
+
+
diff --git a/help/en/reportDifference.png b/help/en/reportDifference.png new file mode 100755 index 0000000000..0644b8f460 Binary files /dev/null and b/help/en/reportDifference.png differ diff --git a/help/en/reportDifference.xml b/help/en/reportDifference.xml new file mode 100644 index 0000000000..037afec515 --- /dev/null +++ b/help/en/reportDifference.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + Gives the result of 6 plus 2 + + + + + + Gives the result of 6 minus 2 + + + + + + Gives the result of 6 times 2 + + + + + + Gives the result of 6 divided by 2 + + + + + diff --git a/help/en/reportEquals.png b/help/en/reportEquals.png new file mode 100755 index 0000000000..8df01b406a Binary files /dev/null and b/help/en/reportEquals.png differ diff --git a/help/en/reportEquals.xml b/help/en/reportEquals.xml new file mode 100644 index 0000000000..1a5cebb8dd --- /dev/null +++ b/help/en/reportEquals.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + If direction equals 0 (pointing up) + Then do this + + + + + + + + + + + true + + + + + + false + + + + +

The inputs can be any kind of value.

+
+
+
+
diff --git a/help/en/reportFindFirst.png b/help/en/reportFindFirst.png new file mode 100644 index 0000000000..33ccf13005 Binary files /dev/null and b/help/en/reportFindFirst.png differ diff --git a/help/en/reportFindFirst.xml b/help/en/reportFindFirst.xml new file mode 100644 index 0000000000..5d0fe65fcb --- /dev/null +++ b/help/en/reportFindFirst.xml @@ -0,0 +1,172 @@ + + + + +
+ Reports the first item in the list that matches the predicate. +
+ + + + + + University + + +

Compare:

+ + + + + + +
+
+ + + + + + false + + + + + + + + +

+ Find first + + reports False if no item in the list matches the + predicate.\n( + + Keep + reports the empty list in that situation.) +

+

+ Find first + means the same as + + but + find first + + is faster if a match is found because it doesn't search + the rest of the list. + +

+
+
+
diff --git a/help/en/reportFindFirst_list.png b/help/en/reportFindFirst_list.png new file mode 100644 index 0000000000..c7e5a644d0 Binary files /dev/null and b/help/en/reportFindFirst_list.png differ diff --git a/help/en/reportGet.png b/help/en/reportGet.png new file mode 100755 index 0000000000..99c106b30a Binary files /dev/null and b/help/en/reportGet.png differ diff --git a/help/en/reportGet.xml b/help/en/reportGet.xml new file mode 100644 index 0000000000..a6587c6d2c --- /dev/null +++ b/help/en/reportGet.xml @@ -0,0 +1,153 @@ + + + + +
Reports properties of this sprite and its family.
+ + + + + + + + neighbors + self + other sprites + clones + other clones + parts + anchor + stage + children + parent + temporary? + name + costume + costumes + sounds + dangling? + draggable? + width + height + rotation style + rotation x + rotation y + center x + center y + + + + + +

● Reports an object

+ + + + + + +
+ +

● Reports a number

+ + + + -115 + + +
+ +

● Reports a Boolean

+ + + + false + + +
+ +

● Reports a list

+ + + + + + +
+
+
+
+
+ + + + + + + + + + + + soccerball + + +

+ For more details on what each option means, read the + Reference Manual, Chapter VII. +

+
+
+
diff --git a/help/en/reportGetImageAttribute.png b/help/en/reportGetImageAttribute.png new file mode 100755 index 0000000000..4320292ad8 Binary files /dev/null and b/help/en/reportGetImageAttribute.png differ diff --git a/help/en/reportGetImageAttribute.xml b/help/en/reportGetImageAttribute.xml new file mode 100644 index 0000000000..4d9806a85d --- /dev/null +++ b/help/en/reportGetImageAttribute.xml @@ -0,0 +1,84 @@ + + + +
+ + + + + + +
+
+ + + + + + + + + width + height + pixels + + + Turtle + current + + alonzo + ballerina + bear2 + blue + + + + + + + + + + + + +
Report attributes of a costume.
+

+ Width and height are reported in pixels, but don't change in + presentation mode. Pixels are reported as a list of lists, + in which each sublist is the RGBA values for one pixel (Red, + Green, Blue, Alpha). “Alpha” is the opacity (inverse of ghost + effect). All values are between 0 and 255. +

+

+ + The pixel list does not have width or height information; + it needs a width to make it a viewable costume. + + + + in the Pixels library uses the current costume's width. + +

+
+
+
diff --git a/help/en/reportGetImageAttribute_table.png b/help/en/reportGetImageAttribute_table.png new file mode 100644 index 0000000000..033d23c743 Binary files /dev/null and b/help/en/reportGetImageAttribute_table.png differ diff --git a/help/en/reportGetSoundAttribute.png b/help/en/reportGetSoundAttribute.png new file mode 100755 index 0000000000..1ee74eca54 Binary files /dev/null and b/help/en/reportGetSoundAttribute.png differ diff --git a/help/en/reportGetSoundAttribute.xml b/help/en/reportGetSoundAttribute.xml new file mode 100644 index 0000000000..ca93b37f30 --- /dev/null +++ b/help/en/reportGetSoundAttribute.xml @@ -0,0 +1,45 @@ + + + + +
Report sound properties.
+ + + + + + + name + duration + length + number of channels + sample rate + samples + + + + + “Duration” is in seconds. + Duration = Length / Sample rate. + + “Length” is in the number of samples. + “Number of channels” is 2 for stereo. + + “Samples” is a list containing the actual numeric + samples (volume at each instant). + + + + + +
diff --git a/help/en/reportGetVar.png b/help/en/reportGetVar.png new file mode 100755 index 0000000000..853ee02566 Binary files /dev/null and b/help/en/reportGetVar.png differ diff --git a/help/en/reportGetVar.xml b/help/en/reportGetVar.xml new file mode 100644 index 0000000000..ab68a795a2 --- /dev/null +++ b/help/en/reportGetVar.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + If the score is greater than 5 + Say “You win!” for 2 seconds + Stop all scripts + + + + + + +

+ Click the checkbox (next to the block) to show the monitor on + the stage: +

+ + + + + + + +

Right-click on the monitor to get different views:

+ + + + + +

Large readout

+
+ + +

Slider

+
+

+ Slider min and max value can be set in the + right-click menu. +

+
+
+
+
+
diff --git a/help/en/reportGetVar_context_menu.png b/help/en/reportGetVar_context_menu.png new file mode 100644 index 0000000000..02bb3b0c44 Binary files /dev/null and b/help/en/reportGetVar_context_menu.png differ diff --git a/help/en/reportGetVar_large_watcher.png b/help/en/reportGetVar_large_watcher.png new file mode 100644 index 0000000000..91f9083bac Binary files /dev/null and b/help/en/reportGetVar_large_watcher.png differ diff --git a/help/en/reportGetVar_slider_watcher.png b/help/en/reportGetVar_slider_watcher.png new file mode 100644 index 0000000000..8fbd8a2899 Binary files /dev/null and b/help/en/reportGetVar_slider_watcher.png differ diff --git a/help/en/reportGetVar_watcher.png b/help/en/reportGetVar_watcher.png new file mode 100644 index 0000000000..a209b0d06d Binary files /dev/null and b/help/en/reportGetVar_watcher.png differ diff --git a/help/en/reportGet_alonzo.png b/help/en/reportGet_alonzo.png new file mode 100644 index 0000000000..aac2bfa88b Binary files /dev/null and b/help/en/reportGet_alonzo.png differ diff --git a/help/en/reportGet_cake.png b/help/en/reportGet_cake.png new file mode 100644 index 0000000000..66db22668a Binary files /dev/null and b/help/en/reportGet_cake.png differ diff --git a/help/en/reportGet_list.png b/help/en/reportGet_list.png new file mode 100644 index 0000000000..ebd03aefdb Binary files /dev/null and b/help/en/reportGet_list.png differ diff --git a/help/en/reportGlobalFlag.png b/help/en/reportGlobalFlag.png new file mode 100755 index 0000000000..da7e5b715b Binary files /dev/null and b/help/en/reportGlobalFlag.png differ diff --git a/help/en/reportGlobalFlag.xml b/help/en/reportGlobalFlag.xml new file mode 100644 index 0000000000..85eddbfead --- /dev/null +++ b/help/en/reportGlobalFlag.xml @@ -0,0 +1,53 @@ + + + + +
Report global flag.
+ + + + + + + turbo mode + flat line ends + video capture + mirror video + + + +

+ + Reports true or false based on the value of the chosen + setting from the settings menu ( + + + ). +

+
+
+ + +

+ (Note: The particular settings available in the menu of this + block are just the ones Jens has needed for some project of + his. If you'd like to be able to read and set all the + settings in your project, load the “Provide getters and + setters for all GUI controls” library.) +

+ + “Anything you can do from the GUI, you should be able to do + from the programming language, and vice versa.” + — Mike Eisenberg, d. 3/12/2019 RIP + +
+
+
diff --git a/help/en/reportGreaterThan.png b/help/en/reportGreaterThan.png new file mode 100755 index 0000000000..638d5a711d Binary files /dev/null and b/help/en/reportGreaterThan.png differ diff --git a/help/en/reportGreaterThan.xml b/help/en/reportGreaterThan.xml new file mode 100644 index 0000000000..292f13b795 --- /dev/null +++ b/help/en/reportGreaterThan.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + If y position is greater than 200 (near the top of + the stage) + + Then do this + + + + + + + + + + + false + + + + + + true + + + + +

If the inputs aren't numbers, they're compared in alphabetical order.

+
+
+
+
diff --git a/help/en/reportIfElse.png b/help/en/reportIfElse.png new file mode 100755 index 0000000000..16ea56623e Binary files /dev/null and b/help/en/reportIfElse.png differ diff --git a/help/en/reportIfElse.xml b/help/en/reportIfElse.xml new file mode 100644 index 0000000000..1ed0eef3d5 --- /dev/null +++ b/help/en/reportIfElse.xml @@ -0,0 +1,80 @@ + + + +
+ + + + + + +
+
+ + + +
Choose which of two values to report.
+ + + + + + No + + + + + + Yes + + + + + + + + + +
diff --git a/help/en/reportIsA.png b/help/en/reportIsA.png new file mode 100755 index 0000000000..3e95c256c3 Binary files /dev/null and b/help/en/reportIsA.png differ diff --git a/help/en/reportIsA.xml b/help/en/reportIsA.xml new file mode 100644 index 0000000000..d14e369337 --- /dev/null +++ b/help/en/reportIsA.xml @@ -0,0 +1,139 @@ + + + + +
+ Reports + + if input is a given type. +
+ + +

All of these are true:

+ + + + + + + + + + + + + + + + + + + +
+
+ + + +

+ The possible types are number, text, Boolean (true or + false), list, sprite, costume, sound (object-oriented types), command (a script or jigsaw-shaped command + block), + reporter (an oval block that reports a value), and + predicate (a hexagonal block that reports true or false). +

+

Every value has exactly one of these types.

+
+ + + + + number + text + Boolean + list + sprite + costume + sound + command + reporter + predicate + + + +
+
+
diff --git a/help/en/reportIsIdentical.png b/help/en/reportIsIdentical.png new file mode 100755 index 0000000000..0b5343848d Binary files /dev/null and b/help/en/reportIsIdentical.png differ diff --git a/help/en/reportIsIdentical.xml b/help/en/reportIsIdentical.xml new file mode 100644 index 0000000000..148d58c6a9 --- /dev/null +++ b/help/en/reportIsIdentical.xml @@ -0,0 +1,113 @@ + + + + +
Reports whether the two inputs are the same thing.
+ + + + + + false + + + + These two lists have the same items, but they're two + different lists. + + + + + + + + + + true + + + + +

+ In this example, the two inputs are the very same + list; changing one will change the other too: +

+ + + + + + + +
+
+
+
+ + +

+ + + is useful mainly for lists, because lists are mutable: + you can change what's inside a list, but it's still the + same list, just changed, like changing the size of a + costume. If your program mutates lists, then it might be + important for you to know whether the one you're changing + is the same as one used in another part of the project. + +

+
+
+
diff --git a/help/en/reportIsIdentical_list.png b/help/en/reportIsIdentical_list.png new file mode 100644 index 0000000000..53c324730f Binary files /dev/null and b/help/en/reportIsIdentical_list.png differ diff --git a/help/en/reportKeep.png b/help/en/reportKeep.png new file mode 100755 index 0000000000..cc8d7db508 Binary files /dev/null and b/help/en/reportKeep.png differ diff --git a/help/en/reportKeep.xml b/help/en/reportKeep.xml new file mode 100644 index 0000000000..a8f9907614 --- /dev/null +++ b/help/en/reportKeep.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + +

+ + Each list item is put into the empty input slot of the + predicate block. If the predicate reports + + + + then that item is included in the result list. Note that if + the predicate has a default input value, you have to clear + the slot to use it with KEEP, e.g., this won't work: + +

+ + + +

KEEP makes a new list; the original list is not modified.

+
+
+
diff --git a/help/en/reportKeep_list1.png b/help/en/reportKeep_list1.png new file mode 100644 index 0000000000..fc35289013 Binary files /dev/null and b/help/en/reportKeep_list1.png differ diff --git a/help/en/reportKeep_list2.png b/help/en/reportKeep_list2.png new file mode 100644 index 0000000000..f11233bcf2 Binary files /dev/null and b/help/en/reportKeep_list2.png differ diff --git a/help/en/reportKeyPressed.png b/help/en/reportKeyPressed.png new file mode 100644 index 0000000000..8cc1fed731 Binary files /dev/null and b/help/en/reportKeyPressed.png differ diff --git a/help/en/reportKeyPressed.xml b/help/en/reportKeyPressed.xml new file mode 100644 index 0000000000..734b083a3b --- /dev/null +++ b/help/en/reportKeyPressed.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + If this is true + Then do this + + + + + + +

+ Use + + instead of + + + when you want to keep, for example, the space key pressed + continuously. + +

+
+
+
diff --git a/help/en/reportLessThan.png b/help/en/reportLessThan.png new file mode 100755 index 0000000000..57e7412123 Binary files /dev/null and b/help/en/reportLessThan.png differ diff --git a/help/en/reportLessThan.xml b/help/en/reportLessThan.xml new file mode 100644 index 0000000000..7ab5b50716 --- /dev/null +++ b/help/en/reportLessThan.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + If the distance to mouse-pointer is less than 10 + (mouse-pointer is close) + + Then do this + + + + + + + + + + + true + + + + + + false + + + + +

If the inputs aren't numbers, they're compared in alphabetical order.

+
+
+
+
diff --git a/help/en/reportLetter.png b/help/en/reportLetter.png new file mode 100755 index 0000000000..63b592d437 Binary files /dev/null and b/help/en/reportLetter.png differ diff --git a/help/en/reportLetter.xml b/help/en/reportLetter.xml new file mode 100644 index 0000000000..5641c6f1f7 --- /dev/null +++ b/help/en/reportLetter.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + Says the first letter of the world apple + + + + + + + + + Sets the value of the variable counter to 1 + Repeats for the number of letters in the word + Says the letter at that place in the word + Increases counter by 1 + + + + + diff --git a/help/en/reportListContainsItem.png b/help/en/reportListContainsItem.png new file mode 100644 index 0000000000..676faa4b03 Binary files /dev/null and b/help/en/reportListContainsItem.png differ diff --git a/help/en/reportListContainsItem.xml b/help/en/reportListContainsItem.xml new file mode 100644 index 0000000000..94bce2e081 --- /dev/null +++ b/help/en/reportListContainsItem.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + If list contains this item + Says this + If not, says this + + + + + + +

+ + + reports whether an item is in a list. If the item matches + exactly, then it reports true. If not, it reports false. + +

+
+
+
diff --git a/help/en/reportListIsEmpty.png b/help/en/reportListIsEmpty.png new file mode 100755 index 0000000000..d86c52d6fa Binary files /dev/null and b/help/en/reportListIsEmpty.png differ diff --git a/help/en/reportListIsEmpty.xml b/help/en/reportListIsEmpty.xml new file mode 100644 index 0000000000..c881b6ead3 --- /dev/null +++ b/help/en/reportListIsEmpty.xml @@ -0,0 +1,68 @@ + + + + +
+ Reports + + if its input is the empty list. +
+ + + + + + + + true + + + + + + + + false + + + + + + false + + + + + + +
diff --git a/help/en/reportListItem.png b/help/en/reportListItem.png new file mode 100644 index 0000000000..548f5ec567 Binary files /dev/null and b/help/en/reportListItem.png differ diff --git a/help/en/reportListItem.xml b/help/en/reportListItem.xml new file mode 100644 index 0000000000..636ebe4120 --- /dev/null +++ b/help/en/reportListItem.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + Say one of the items from a list of phrases + + + + + + + + + + If the current score is greater than item 1 on a top + score list + + Play a clapping sound + + + + + + +

+ The item block reports the value of the item at the specified + place on a list. +

+ + + + + 1 + last + any + + + + + Select from the menu or insert a number to indicate + which item you want + + + +

+ You can fit an item block into other blocks, for example: + say, switch to costume, play sound, or broadcast. +

+
+
+
diff --git a/help/en/reportListLength.png b/help/en/reportListLength.png new file mode 100644 index 0000000000..dbb5a4ef70 Binary files /dev/null and b/help/en/reportListLength.png differ diff --git a/help/en/reportListLength.xml b/help/en/reportListLength.xml new file mode 100644 index 0000000000..30bd3401fd --- /dev/null +++ b/help/en/reportListLength.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + Set the counter value to 1 + Repeat for the number of items in the list + Say the item at that place in the list + Increase the counter by 1 + + + + + + +

+ This block report reports how many items are currently in a + list. +

+ +

+ The number is the same as the length shown at the bottom of + the list monitor. +

+ +
+
+
diff --git a/help/en/reportListLength_watcher.png b/help/en/reportListLength_watcher.png new file mode 100644 index 0000000000..e8b52cf74a Binary files /dev/null and b/help/en/reportListLength_watcher.png differ diff --git a/help/en/reportMap.png b/help/en/reportMap.png new file mode 100755 index 0000000000..f07de01b67 Binary files /dev/null and b/help/en/reportMap.png differ diff --git a/help/en/reportMap.xml b/help/en/reportMap.xml new file mode 100644 index 0000000000..96d53a58ef --- /dev/null +++ b/help/en/reportMap.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + This input takes a reporter. Empty input slots in the + reporter will all be filled with each list item in + turn. + + + + + + + + + + + + diff --git a/help/en/reportMap_list1.png b/help/en/reportMap_list1.png new file mode 100644 index 0000000000..6888c80b7d Binary files /dev/null and b/help/en/reportMap_list1.png differ diff --git a/help/en/reportMap_list2.png b/help/en/reportMap_list2.png new file mode 100644 index 0000000000..0bf27f6748 Binary files /dev/null and b/help/en/reportMap_list2.png differ diff --git a/help/en/reportMap_list3.png b/help/en/reportMap_list3.png new file mode 100644 index 0000000000..8d427ff602 Binary files /dev/null and b/help/en/reportMap_list3.png differ diff --git a/help/en/reportModulus.png b/help/en/reportModulus.png new file mode 100755 index 0000000000..8987424543 Binary files /dev/null and b/help/en/reportModulus.png differ diff --git a/help/en/reportModulus.xml b/help/en/reportModulus.xml new file mode 100644 index 0000000000..1ea41b002c --- /dev/null +++ b/help/en/reportModulus.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + Keep doing this: + Take one step + Every ten steps + Jump + + + + + + +

+ + + gives the remainder of the division of the two numbers. + +

+

+ For example, + + + is 5 (143 divided 6 is 23 and the remainder is 5). + +

+
+
+
diff --git a/help/en/reportMonadic.png b/help/en/reportMonadic.png new file mode 100755 index 0000000000..8002faed88 Binary files /dev/null and b/help/en/reportMonadic.png differ diff --git a/help/en/reportMonadic.xml b/help/en/reportMonadic.xml new file mode 100644 index 0000000000..e12cf06b4d --- /dev/null +++ b/help/en/reportMonadic.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + Put the pen down + Forever + Move to the right + + Set the y position to a function of the x position + + + + + +

Set y based on the sine of x

+
+
+
+ + + + + + + abs + neg + ceiling + floor + sqrt + sin + cos + tan + asin + acos + atan + ln + log + lg + e^ + 10^ + 2^ + + + +

+ This block performs a mathematical function. Choose + the math function from the block's drop down menu. +

+

+ Note: Trig functions are based on angles in + degrees, not radians! +

+
+
+
+
+
diff --git a/help/en/reportMonadic_sine_wave.png b/help/en/reportMonadic_sine_wave.png new file mode 100644 index 0000000000..662c8b259b Binary files /dev/null and b/help/en/reportMonadic_sine_wave.png differ diff --git a/help/en/reportMouseDown.png b/help/en/reportMouseDown.png new file mode 100755 index 0000000000..ac59d51a3c Binary files /dev/null and b/help/en/reportMouseDown.png differ diff --git a/help/en/reportMouseDown.xml b/help/en/reportMouseDown.xml new file mode 100644 index 0000000000..b75870e7c3 --- /dev/null +++ b/help/en/reportMouseDown.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + If the mouse button is clicked + Then do this + + + + + + + + + + + Reports true if the mouse button is clicked anywhere + on the screen + + + + + + diff --git a/help/en/reportMouseX.png b/help/en/reportMouseX.png new file mode 100644 index 0000000000..1cfa352430 Binary files /dev/null and b/help/en/reportMouseX.png differ diff --git a/help/en/reportMouseX.xml b/help/en/reportMouseX.xml new file mode 100644 index 0000000000..c692abc67c --- /dev/null +++ b/help/en/reportMouseX.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + Keep doing this: + + Set the whirl effect to the mouse's x position + + + + + + +

Mouse x = 0

+
+ + +

Mouse x = -100

+
+ + +

Mouse x = 100

+
+
+
+
+ + + + + + Reports the x position of the mouse pointer + + + + + +
diff --git a/help/en/reportMouseX_cat1.png b/help/en/reportMouseX_cat1.png new file mode 100644 index 0000000000..5dacdf9043 Binary files /dev/null and b/help/en/reportMouseX_cat1.png differ diff --git a/help/en/reportMouseX_cat2.png b/help/en/reportMouseX_cat2.png new file mode 100644 index 0000000000..499624c940 Binary files /dev/null and b/help/en/reportMouseX_cat2.png differ diff --git a/help/en/reportMouseX_cat3.png b/help/en/reportMouseX_cat3.png new file mode 100644 index 0000000000..9446326a32 Binary files /dev/null and b/help/en/reportMouseX_cat3.png differ diff --git a/help/en/reportMouseX_range.png b/help/en/reportMouseX_range.png new file mode 100644 index 0000000000..829a7b2205 Binary files /dev/null and b/help/en/reportMouseX_range.png differ diff --git a/help/en/reportMouseY.png b/help/en/reportMouseY.png new file mode 100755 index 0000000000..a75ee70903 Binary files /dev/null and b/help/en/reportMouseY.png differ diff --git a/help/en/reportMouseY.xml b/help/en/reportMouseY.xml new file mode 100644 index 0000000000..289b76845d --- /dev/null +++ b/help/en/reportMouseY.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + Keep doing this: + + Set the sprite's transparency to the mouse's y + position + + + + + + +

Mouse y = -50

+
+ + +

Mouse y = 0

+
+ + +

Mouse y = 80

+
+
+
+
+ + + + + + Reports the y position of the mouse pointer + + + + + +
diff --git a/help/en/reportMouseY_cat1.png b/help/en/reportMouseY_cat1.png new file mode 100644 index 0000000000..6edc016904 Binary files /dev/null and b/help/en/reportMouseY_cat1.png differ diff --git a/help/en/reportMouseY_cat2.png b/help/en/reportMouseY_cat2.png new file mode 100644 index 0000000000..87a145c1dc Binary files /dev/null and b/help/en/reportMouseY_cat2.png differ diff --git a/help/en/reportMouseY_cat3.png b/help/en/reportMouseY_cat3.png new file mode 100644 index 0000000000..5370014cf7 Binary files /dev/null and b/help/en/reportMouseY_cat3.png differ diff --git a/help/en/reportMouseY_range.png b/help/en/reportMouseY_range.png new file mode 100644 index 0000000000..f16153741a Binary files /dev/null and b/help/en/reportMouseY_range.png differ diff --git a/help/en/reportNewCostumeStretched.png b/help/en/reportNewCostumeStretched.png new file mode 100644 index 0000000000..9fc685f233 Binary files /dev/null and b/help/en/reportNewCostumeStretched.png differ diff --git a/help/en/reportNewCostumeStretched.xml b/help/en/reportNewCostumeStretched.xml new file mode 100644 index 0000000000..5670f332b6 --- /dev/null +++ b/help/en/reportNewCostumeStretched.xml @@ -0,0 +1,122 @@ + + + + +
Stretch a costume.
+ + + + + + + + + + + + + + +

+ Note that this is a reporter, not a command! It reports the + stretched costume. If you want the sprite to wear it, you have to say +

+ +
+
+ + +

+ Note: If the first input is a list of pixels rather than a + costume, then the x and y inputs are interpreted not as a + percent (of the costume's original dimensions) but as an + absolute number of pixels, so you can do this: +

+ +

+ 1. Find + +

+

+ 2. Transform the pixels using + map +

+

+ 3. Use + stretch + to restore the width and height +

+
+
+
diff --git a/help/en/reportNewCostumeStretched_alonzo1.png b/help/en/reportNewCostumeStretched_alonzo1.png new file mode 100644 index 0000000000..a86e9f2053 Binary files /dev/null and b/help/en/reportNewCostumeStretched_alonzo1.png differ diff --git a/help/en/reportNewCostumeStretched_alonzo2.png b/help/en/reportNewCostumeStretched_alonzo2.png new file mode 100644 index 0000000000..c42d1fd742 Binary files /dev/null and b/help/en/reportNewCostumeStretched_alonzo2.png differ diff --git a/help/en/reportNewList.png b/help/en/reportNewList.png new file mode 100755 index 0000000000..bd98d10f10 Binary files /dev/null and b/help/en/reportNewList.png differ diff --git a/help/en/reportNewList.xml b/help/en/reportNewList.xml new file mode 100644 index 0000000000..44d500c523 --- /dev/null +++ b/help/en/reportNewList.xml @@ -0,0 +1,127 @@ + + + + +
Reports a newly created list with the given items.
+ + + + + + + Use the arrows to change the number of inputs. + + + + + + + + + + + + Make an empty list. + + + + + + + + + + The list items can be anything; text, numbers, + blocks, scripts, and even other lists! + + + + + + + +

You can put a list in a rectangular input slot:

+ + + + + + + + + +

and also in a lists-only input slot:

+ + + + + + + + 4 + + + +
+
+
diff --git a/help/en/reportNewList_alonzo.png b/help/en/reportNewList_alonzo.png new file mode 100644 index 0000000000..f657d2d9ab Binary files /dev/null and b/help/en/reportNewList_alonzo.png differ diff --git a/help/en/reportNewList_list1.png b/help/en/reportNewList_list1.png new file mode 100644 index 0000000000..c7e5a644d0 Binary files /dev/null and b/help/en/reportNewList_list1.png differ diff --git a/help/en/reportNewList_list2.png b/help/en/reportNewList_list2.png new file mode 100644 index 0000000000..b45214a6f5 Binary files /dev/null and b/help/en/reportNewList_list2.png differ diff --git a/help/en/reportNot.png b/help/en/reportNot.png new file mode 100755 index 0000000000..48d8e775b1 Binary files /dev/null and b/help/en/reportNot.png differ diff --git a/help/en/reportNot.xml b/help/en/reportNot.xml new file mode 100644 index 0000000000..4ce572cc75 --- /dev/null +++ b/help/en/reportNot.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + If not touching Sprite(2) + Then try to reach it + + + + + diff --git a/help/en/reportNumbers.png b/help/en/reportNumbers.png new file mode 100755 index 0000000000..20f81df156 Binary files /dev/null and b/help/en/reportNumbers.png differ diff --git a/help/en/reportNumbers.xml b/help/en/reportNumbers.xml new file mode 100644 index 0000000000..bf5815afa5 --- /dev/null +++ b/help/en/reportNumbers.xml @@ -0,0 +1,130 @@ + + + +
+ + + + + + +
+
+ + + +
Report a list of consecutive numbers.
+ + + + + + + + + + + + + + + + + + + + + + +

(Range must be ascending.)

+
+
+ + + +

+ A number n is prime if the list of its factors in the range + [2,n-1] is empty. +

+ + + + + true + + + + + + false + + + + + + + + + +
+
+
diff --git a/help/en/reportNumbers_list1.png b/help/en/reportNumbers_list1.png new file mode 100644 index 0000000000..83f99eb8f8 Binary files /dev/null and b/help/en/reportNumbers_list1.png differ diff --git a/help/en/reportNumbers_list2.png b/help/en/reportNumbers_list2.png new file mode 100644 index 0000000000..6e7217bda0 Binary files /dev/null and b/help/en/reportNumbers_list2.png differ diff --git a/help/en/reportNumbers_list3.png b/help/en/reportNumbers_list3.png new file mode 100644 index 0000000000..f8ba5c677d Binary files /dev/null and b/help/en/reportNumbers_list3.png differ diff --git a/help/en/reportNumbers_list4.png b/help/en/reportNumbers_list4.png new file mode 100644 index 0000000000..21874940a4 Binary files /dev/null and b/help/en/reportNumbers_list4.png differ diff --git a/help/en/reportObject.png b/help/en/reportObject.png new file mode 100755 index 0000000000..4add2a7d73 Binary files /dev/null and b/help/en/reportObject.png differ diff --git a/help/en/reportObject.xml b/help/en/reportObject.xml new file mode 100644 index 0000000000..0a767b5944 --- /dev/null +++ b/help/en/reportObject.xml @@ -0,0 +1,34 @@ + + + + +
Report a named object.
+ + + + + + + Myself + Stage + + Purple + Red + Sprite(3) + + + + + + + + +
diff --git a/help/en/reportObject_turtle.png b/help/en/reportObject_turtle.png new file mode 100644 index 0000000000..44642f4eaf Binary files /dev/null and b/help/en/reportObject_turtle.png differ diff --git a/help/en/reportOr.png b/help/en/reportOr.png new file mode 100644 index 0000000000..41f3e6c9c1 Binary files /dev/null and b/help/en/reportOr.png differ diff --git a/help/en/reportOr.xml b/help/en/reportOr.xml new file mode 100644 index 0000000000..8a92bddf88 --- /dev/null +++ b/help/en/reportOr.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + Forever + If touching either the edge or Sprite(2) + Then do this + + + + + diff --git a/help/en/reportPenTrailsAsCostume.png b/help/en/reportPenTrailsAsCostume.png new file mode 100755 index 0000000000..9969c21e42 Binary files /dev/null and b/help/en/reportPenTrailsAsCostume.png differ diff --git a/help/en/reportPenTrailsAsCostume.xml b/help/en/reportPenTrailsAsCostume.xml new file mode 100644 index 0000000000..5d2a51f13f --- /dev/null +++ b/help/en/reportPenTrailsAsCostume.xml @@ -0,0 +1,91 @@ + + + + +
Report lines drawn on stage as a costume.
+ + + + + + + + + + + +

+ The reported value does not include the stage + background or the sprite itself, just the lines drawn + with the pen. +

+
+
+
+
+ + +

What can you do with the reported costume?

+ + Add it to your costumes. + + + + Modify it. + + + +
+
+
diff --git a/help/en/reportPenTrailsAsCostume_pentrails.png b/help/en/reportPenTrailsAsCostume_pentrails.png new file mode 100644 index 0000000000..88188ac5cb Binary files /dev/null and b/help/en/reportPenTrailsAsCostume_pentrails.png differ diff --git a/help/en/reportPenTrailsAsCostume_stage.png b/help/en/reportPenTrailsAsCostume_stage.png new file mode 100644 index 0000000000..0dbb5f9791 Binary files /dev/null and b/help/en/reportPenTrailsAsCostume_stage.png differ diff --git a/help/en/reportPenTrailsAsCostume_transform_pentrails.png b/help/en/reportPenTrailsAsCostume_transform_pentrails.png new file mode 100644 index 0000000000..b9e9684d5f Binary files /dev/null and b/help/en/reportPenTrailsAsCostume_transform_pentrails.png differ diff --git a/help/en/reportPower.png b/help/en/reportPower.png new file mode 100755 index 0000000000..d12faa2812 Binary files /dev/null and b/help/en/reportPower.png differ diff --git a/help/en/reportPower.xml b/help/en/reportPower.xml new file mode 100644 index 0000000000..969a4a7612 --- /dev/null +++ b/help/en/reportPower.xml @@ -0,0 +1,112 @@ + + + +
+ + + + + +
+
+ + + +
Exponentiation (power) function.
+ + + + + + + 81 + + + 3×3×3×3 + + + + + + 1.7320508075688772 + + + √3 + + + + + + + + 0.3333333333333333 + + + + + + + + + NaN + + + √-3 + + + + + + + + + + + 1.0605752387249068e-16+1.7320508075688772i + + + ≈0+√3i + + +

+ Would you prefer this answer? Then load the “infinite + precision integers” library and do this: +

+ +
+
+
diff --git a/help/en/reportProduct.png b/help/en/reportProduct.png new file mode 100755 index 0000000000..0644b8f460 Binary files /dev/null and b/help/en/reportProduct.png differ diff --git a/help/en/reportProduct.xml b/help/en/reportProduct.xml new file mode 100644 index 0000000000..037afec515 --- /dev/null +++ b/help/en/reportProduct.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + Gives the result of 6 plus 2 + + + + + + Gives the result of 6 minus 2 + + + + + + Gives the result of 6 times 2 + + + + + + Gives the result of 6 divided by 2 + + + + + diff --git a/help/en/reportQuotient.png b/help/en/reportQuotient.png new file mode 100755 index 0000000000..0644b8f460 Binary files /dev/null and b/help/en/reportQuotient.png differ diff --git a/help/en/reportQuotient.xml b/help/en/reportQuotient.xml new file mode 100644 index 0000000000..037afec515 --- /dev/null +++ b/help/en/reportQuotient.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + Gives the result of 6 plus 2 + + + + + + Gives the result of 6 minus 2 + + + + + + Gives the result of 6 times 2 + + + + + + Gives the result of 6 divided by 2 + + + + + diff --git a/help/en/reportRandom.png b/help/en/reportRandom.png new file mode 100755 index 0000000000..649ecd4291 Binary files /dev/null and b/help/en/reportRandom.png differ diff --git a/help/en/reportRandom.xml b/help/en/reportRandom.xml new file mode 100644 index 0000000000..3671fcf158 --- /dev/null +++ b/help/en/reportRandom.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + Set sprite's position to a random point anywhere on + the stage + + + +

+ This can be abbreviated with + +

+
+
+ + + + + + Picks a random number from 1 and 10. + + + + + + + Click to have a sprite say a random number. Click + again to get another random number. + + + + + + + 2.94103681 + + + + If either input isn't an integer, then the result can be + any value between the input values, not just whole numbers. + + + + + +
diff --git a/help/en/reportRelationTo.png b/help/en/reportRelationTo.png new file mode 100644 index 0000000000..0fc9f57699 Binary files /dev/null and b/help/en/reportRelationTo.png differ diff --git a/help/en/reportRelationTo.xml b/help/en/reportRelationTo.xml new file mode 100644 index 0000000000..87bc7c2467 --- /dev/null +++ b/help/en/reportRelationTo.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + If distance to the dog sprite is less than 20 + + Then do this + + + + + + + distance + direction + + + + + + Can also report what + + + + to face in order to be + facing toward the other sprite. + + + + + + + + +

Select from the dropdown menu to choose:

+ + + + + + Reports the distance from this sprite to the + pointer ( + + + ) + + + + + + + + Reports the distance to another sprite + + + +
+
+
diff --git a/help/en/reportRound.png b/help/en/reportRound.png new file mode 100755 index 0000000000..616308058a Binary files /dev/null and b/help/en/reportRound.png differ diff --git a/help/en/reportRound.xml b/help/en/reportRound.xml new file mode 100644 index 0000000000..6faefe956a --- /dev/null +++ b/help/en/reportRound.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + Keep doing this forever: + + Say how many seconds is on the timer (rounded to the + nearest whole number) + + + + + + + +

+ + + gives the rounded value of a number. That means it turns + a decimal number into the nearest whole number. + +

+

+ For example: + + is 5, and + + is 6. +

+
+
+
diff --git a/help/en/reportShown.png b/help/en/reportShown.png new file mode 100755 index 0000000000..ac9e601c5a Binary files /dev/null and b/help/en/reportShown.png differ diff --git a/help/en/reportShown.xml b/help/en/reportShown.xml new file mode 100644 index 0000000000..4fdb9334de --- /dev/null +++ b/help/en/reportShown.xml @@ -0,0 +1,26 @@ + + + + +
Report true if sprite is shown.
+ + +

+ Use + + to show the sprite. +

+

+ Use + + to hide the sprite. +

+
+
+
diff --git a/help/en/reportStringSize.png b/help/en/reportStringSize.png new file mode 100755 index 0000000000..99fa04752b Binary files /dev/null and b/help/en/reportStringSize.png differ diff --git a/help/en/reportStringSize.xml b/help/en/reportStringSize.xml new file mode 100644 index 0000000000..896d7fa9c8 --- /dev/null +++ b/help/en/reportStringSize.xml @@ -0,0 +1,26 @@ + + + + + + + + + + Says the number of letters in the word + + + + + + diff --git a/help/en/reportStringSize_elephant.png b/help/en/reportStringSize_elephant.png new file mode 100644 index 0000000000..cc125f48cc Binary files /dev/null and b/help/en/reportStringSize_elephant.png differ diff --git a/help/en/reportSum.png b/help/en/reportSum.png new file mode 100755 index 0000000000..0644b8f460 Binary files /dev/null and b/help/en/reportSum.png differ diff --git a/help/en/reportSum.xml b/help/en/reportSum.xml new file mode 100644 index 0000000000..037afec515 --- /dev/null +++ b/help/en/reportSum.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + Gives the result of 6 plus 2 + + + + + + Gives the result of 6 minus 2 + + + + + + Gives the result of 6 times 2 + + + + + + Gives the result of 6 divided by 2 + + + + + diff --git a/help/en/reportTextSplit.png b/help/en/reportTextSplit.png new file mode 100755 index 0000000000..d592ba6ee7 Binary files /dev/null and b/help/en/reportTextSplit.png differ diff --git a/help/en/reportTextSplit.xml b/help/en/reportTextSplit.xml new file mode 100644 index 0000000000..ef6e207f7d --- /dev/null +++ b/help/en/reportTextSplit.xml @@ -0,0 +1,109 @@ + + + + +
Report list of text split into words or lines.
+ + + + + + + + + +

+ Splitting on a character (space, in this example) can + result in empty list elements if the character appears + several times in a row in the text. +

+
+ + + + + + + +

+ Choosing “whitespace” from the pulldown menu will treat + any number of spaces, tabs, or newlines as a single + separator, to make a list of words. +

+
+ + + + + + + +

+ Split a text into individual characters (including + spaces, newlines, and punctuation as list items). +

+
+ + + + + + + +

+ Split a multiline text into lines. (The newline + character, the carriage return character, or the + combination CR, NL all count as a single line break in + the text.) +

+
+
+
+ + + + + + + + +

+ It's not often useful, but you can use a multi-character + string as the separator. In this example, we get an empty + list item because “an” appears twice in a row in “banana.” +

+
+
+
diff --git a/help/en/reportTextSplit_list1.png b/help/en/reportTextSplit_list1.png new file mode 100644 index 0000000000..97b257496b Binary files /dev/null and b/help/en/reportTextSplit_list1.png differ diff --git a/help/en/reportTextSplit_list2.png b/help/en/reportTextSplit_list2.png new file mode 100644 index 0000000000..aac06cfa0c Binary files /dev/null and b/help/en/reportTextSplit_list2.png differ diff --git a/help/en/reportTextSplit_list3.png b/help/en/reportTextSplit_list3.png new file mode 100644 index 0000000000..10526660c3 Binary files /dev/null and b/help/en/reportTextSplit_list3.png differ diff --git a/help/en/reportTextSplit_list4.png b/help/en/reportTextSplit_list4.png new file mode 100644 index 0000000000..48f865db89 Binary files /dev/null and b/help/en/reportTextSplit_list4.png differ diff --git a/help/en/reportTextSplit_list5.png b/help/en/reportTextSplit_list5.png new file mode 100644 index 0000000000..4be0e7f0de Binary files /dev/null and b/help/en/reportTextSplit_list5.png differ diff --git a/help/en/reportTouchingColor.png b/help/en/reportTouchingColor.png new file mode 100755 index 0000000000..28507568a0 Binary files /dev/null and b/help/en/reportTouchingColor.png differ diff --git a/help/en/reportTouchingColor.xml b/help/en/reportTouchingColor.xml new file mode 100644 index 0000000000..6419e717c7 --- /dev/null +++ b/help/en/reportTouchingColor.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + If sprite is touching this color + Then do this + + + + +

Sprite is touching the color red

+
+
+
+ + + + + + + Get the eye dropper by clicking in the square. + + + + + + + Use the eye dropper to click on the color you want. + + + + + + Color appears in square + + + + +
diff --git a/help/en/reportTouchingColor_cat.png b/help/en/reportTouchingColor_cat.png new file mode 100644 index 0000000000..bdc4181ef8 Binary files /dev/null and b/help/en/reportTouchingColor_cat.png differ diff --git a/help/en/reportTouchingObject.png b/help/en/reportTouchingObject.png new file mode 100644 index 0000000000..c9eb9cbd22 Binary files /dev/null and b/help/en/reportTouchingObject.png differ diff --git a/help/en/reportTouchingObject.xml b/help/en/reportTouchingObject.xml new file mode 100644 index 0000000000..62c646f5c2 --- /dev/null +++ b/help/en/reportTouchingObject.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + If touching the “dog” sprite + Then do this + + + + + +

Not touching...

+
+ + +

Touching...

+
+
+
+
+ + +

+ You can use the + + + block in three different ways. Select from the dropdown + menu to choose. You can check if the sprite is: + +

+ + + + + Touching the mouse-pointer ( + + )? + + + + + + + + Touching the edge of the screen? + + + + + + + Touching another sprite? + + +
+
+
diff --git a/help/en/reportTouchingObject_not_touching.png b/help/en/reportTouchingObject_not_touching.png new file mode 100644 index 0000000000..dd51687077 Binary files /dev/null and b/help/en/reportTouchingObject_not_touching.png differ diff --git a/help/en/reportTouchingObject_touching.png b/help/en/reportTouchingObject_touching.png new file mode 100644 index 0000000000..3001a42a8b Binary files /dev/null and b/help/en/reportTouchingObject_touching.png differ diff --git a/help/en/reportURL.png b/help/en/reportURL.png new file mode 100755 index 0000000000..41788bb8cb Binary files /dev/null and b/help/en/reportURL.png differ diff --git a/help/en/reportURL.xml b/help/en/reportURL.xml new file mode 100644 index 0000000000..bbf24d6bf7 --- /dev/null +++ b/help/en/reportURL.xml @@ -0,0 +1,52 @@ + + + + +
Report web page text.
+ + + + + + + + +

Hint: Use SPLIT to see the result as a list of lines.

+ + + + + + +
+
+ + +

+ Note: Many websites won't work with this block because of an + Internet security feature built into browsers, called “Cross + Origin Resource Sharing.” There's nothing Snap! can do about + this; you should try to get the provider of the website to + allow cross-origin requests from everyone, or at least for + your Internet domain. You can also look for a “CORS proxy,” + which is a website that funnels requests for arbitrary pages + regardless of CORS status. +

+
+
+
diff --git a/help/en/reportURL_html.png b/help/en/reportURL_html.png new file mode 100644 index 0000000000..73e6d7c43c Binary files /dev/null and b/help/en/reportURL_html.png differ diff --git a/help/en/reportURL_list.png b/help/en/reportURL_list.png new file mode 100644 index 0000000000..b39362dfb9 Binary files /dev/null and b/help/en/reportURL_list.png differ diff --git a/help/en/reportUnicode.png b/help/en/reportUnicode.png new file mode 100755 index 0000000000..de30e0672d Binary files /dev/null and b/help/en/reportUnicode.png differ diff --git a/help/en/reportUnicode.xml b/help/en/reportUnicode.xml new file mode 100644 index 0000000000..ece9693bc5 --- /dev/null +++ b/help/en/reportUnicode.xml @@ -0,0 +1,107 @@ + + + + +
Reports the Unicode value of a letter.
+ + +

+ Letters and other characters are represented inside the + computer using a numeric code called Unicode. Type or paste + a single character into the input to get its Unicode number. +

+ + + + + 97 + + + + + + 55 + + + + + + 32 + + + + + + + + 960 + + + + + + 8804 + + + + + + 8734 + + + +
+
+ + + + Some Unicode values: + + 48-57: digits 0-9\n + 65-90: capital letters A-Z\n + 97-122: lower case letters + + 32: space + + +

+ See the complete official Unicode chart at + http://www.unicode.org/charts/ +

+ + There are also unofficial Unicode values for fictional + languages such as Tengwar (Elvish) and Klingon at + http://www.evertype.com/standards/csur/conscript-table.html + +
+
+
+
diff --git a/help/en/reportUnicodeAsLetter.png b/help/en/reportUnicodeAsLetter.png new file mode 100755 index 0000000000..0c6def2a09 Binary files /dev/null and b/help/en/reportUnicodeAsLetter.png differ diff --git a/help/en/reportUnicodeAsLetter.xml b/help/en/reportUnicodeAsLetter.xml new file mode 100644 index 0000000000..f9897f8a06 --- /dev/null +++ b/help/en/reportUnicodeAsLetter.xml @@ -0,0 +1,86 @@ + + + + +
Reports the letter with a given code.
+ + +

+ Letters and other characters are represented inside the + computer using a numeric code called Unicode. Give a Unicode number as input to find out what character it represents. +

+ + + + + A + + + + + + + + + + + + + + π + + + + + + + + + +
+
+ + + + Some Unicode values: + + 48-57: digits 0-9\n + 65-90: capital letters A-Z\n + 97-122: lower case letters + + 32: space + + +

+ See the complete official Unicode chart at + http://www.unicode.org/charts/ +

+ + There are also unofficial Unicode values for fictional + languages such as Tengwar (Elvish) and Klingon at + http://www.evertype.com/standards/csur/conscript-table.html + +
+
+
+
diff --git a/help/en/reportVideo.png b/help/en/reportVideo.png new file mode 100644 index 0000000000..5a48edaa4c Binary files /dev/null and b/help/en/reportVideo.png differ diff --git a/help/en/reportVideo.xml b/help/en/reportVideo.xml new file mode 100644 index 0000000000..2aafd6d703 --- /dev/null +++ b/help/en/reportVideo.xml @@ -0,0 +1,57 @@ + + + + +
Reports information from video capture.
+ + +

+ The second input is a menu of sprites, and restricts the + block's attention to the part of the stage taken up by the + chosen sprite. (“Stage” uses the entire stage area.) +

+

The first input specifies what information you want:

+
+
+ + + + + + snap + motion + direction + + + + + Reports a snapshot of the video as a costume. + + + Reports a number, the speed of a detected moving object + in the video. + + + + Reports a number, the direction in which the object + is moving, suitable for use as input in + + + point in direction + + . + + + + +
diff --git a/help/en/sentence$arrowRightlist.png b/help/en/sentence$arrowRightlist.png new file mode 100755 index 0000000000..eda86ebdbe Binary files /dev/null and b/help/en/sentence$arrowRightlist.png differ diff --git a/help/en/sentence$arrowRightlist.xml b/help/en/sentence$arrowRightlist.xml new file mode 100644 index 0000000000..8bd333736e --- /dev/null +++ b/help/en/sentence$arrowRightlist.xml @@ -0,0 +1,87 @@ + + + + + + +
+ + + + + +
+
+ + + +
Convert a sentence into a list of words.
+ + + + + + + + + + + + +

+ Use + + to do something to every word in a sentence: +

+ + + + boys ears things + + +
+
+
diff --git a/help/en/sentence$arrowRightlist_list.png b/help/en/sentence$arrowRightlist_list.png new file mode 100644 index 0000000000..b45214a6f5 Binary files /dev/null and b/help/en/sentence$arrowRightlist_list.png differ diff --git a/help/en/setEffect.png b/help/en/setEffect.png new file mode 100755 index 0000000000..8ba63eee83 Binary files /dev/null and b/help/en/setEffect.png differ diff --git a/help/en/setEffect.xml b/help/en/setEffect.xml new file mode 100644 index 0000000000..4e231024b0 --- /dev/null +++ b/help/en/setEffect.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + color + saturation + brightness + ghost + fisheye + whirl + pixelate + mosaic + negative + + + + + Click to choose an effect from the menu + + + + + + + + Type in a number between -100 and 100 + + + + + + diff --git a/help/en/setEffect_dog1.png b/help/en/setEffect_dog1.png new file mode 100644 index 0000000000..80122b3817 Binary files /dev/null and b/help/en/setEffect_dog1.png differ diff --git a/help/en/setEffect_dog2.png b/help/en/setEffect_dog2.png new file mode 100644 index 0000000000..a4ab8dd875 Binary files /dev/null and b/help/en/setEffect_dog2.png differ diff --git a/help/en/setEffect_dog3.png b/help/en/setEffect_dog3.png new file mode 100644 index 0000000000..afafd6a48e Binary files /dev/null and b/help/en/setEffect_dog3.png differ diff --git a/help/en/setEffect_dog4.png b/help/en/setEffect_dog4.png new file mode 100644 index 0000000000..fa1b5d60ff Binary files /dev/null and b/help/en/setEffect_dog4.png differ diff --git a/help/en/setEffect_dog5.png b/help/en/setEffect_dog5.png new file mode 100644 index 0000000000..a321922d7d Binary files /dev/null and b/help/en/setEffect_dog5.png differ diff --git a/help/en/setEffect_dog6.png b/help/en/setEffect_dog6.png new file mode 100644 index 0000000000..8fd3f61929 Binary files /dev/null and b/help/en/setEffect_dog6.png differ diff --git a/help/en/setHeading.png b/help/en/setHeading.png new file mode 100755 index 0000000000..506c18a51d Binary files /dev/null and b/help/en/setHeading.png differ diff --git a/help/en/setHeading.xml b/help/en/setHeading.xml new file mode 100644 index 0000000000..6a4a03bee6 --- /dev/null +++ b/help/en/setHeading.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + Point up + + + + + + + + + Point in this direction + + + + + + + + + Point in this direction + + + + + + + + + + + + + + + §_dir + (90) right + (-90) left + (0) up + (180) down + random + + + + + Click to choose from the menu, or type in a number. + + + + + + diff --git a/help/en/setHeading_cat1.png b/help/en/setHeading_cat1.png new file mode 100644 index 0000000000..92d65b96b6 Binary files /dev/null and b/help/en/setHeading_cat1.png differ diff --git a/help/en/setHeading_cat2.png b/help/en/setHeading_cat2.png new file mode 100644 index 0000000000..acda97e8cf Binary files /dev/null and b/help/en/setHeading_cat2.png differ diff --git a/help/en/setHeading_cat3.png b/help/en/setHeading_cat3.png new file mode 100644 index 0000000000..ef1e77ec9e Binary files /dev/null and b/help/en/setHeading_cat3.png differ diff --git a/help/en/setHeading_directions.png b/help/en/setHeading_directions.png new file mode 100644 index 0000000000..092ece64ad Binary files /dev/null and b/help/en/setHeading_directions.png differ diff --git a/help/en/setPan.png b/help/en/setPan.png new file mode 100755 index 0000000000..14e5b5a676 Binary files /dev/null and b/help/en/setPan.png differ diff --git a/help/en/setPan.xml b/help/en/setPan.xml new file mode 100644 index 0000000000..5e078465e0 --- /dev/null +++ b/help/en/setPan.xml @@ -0,0 +1,22 @@ + + + + +
Set balance for sounds.
+ + +

+ 0 is normal. -100 is left channel only; 100 is right channel + only. +

+

+ Each sprite has its own balance, which can be inherited by + clones. +

+
+
+
diff --git a/help/en/setPenHSVA.png b/help/en/setPenHSVA.png new file mode 100644 index 0000000000..0b2582332d Binary files /dev/null and b/help/en/setPenHSVA.png differ diff --git a/help/en/setPenHSVA.xml b/help/en/setPenHSVA.xml new file mode 100644 index 0000000000..84d9e44330 --- /dev/null +++ b/help/en/setPenHSVA.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + hue + saturation + brightness + transparency + + + + + Numeric range is 0-100. Hue wraps around (mod 100). + For the others, anything <0 is 0, anything >100 + is 100. + + + + + + + diff --git a/help/en/setScale.png b/help/en/setScale.png new file mode 100755 index 0000000000..ebe0c3d7ee Binary files /dev/null and b/help/en/setScale.png differ diff --git a/help/en/setScale.xml b/help/en/setScale.xml new file mode 100644 index 0000000000..8753b3d902 --- /dev/null +++ b/help/en/setScale.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + Shrinks the sprite to half its original size + + + + + + + + + + + Grows the sprite to twice its original size + + + + + + + + + + + Returns to original size + + + + + + + + + +

+ Note: There are limits to how small or how big you can make + a sprite. Experiment with different numbers to see how small + or big you can make it. +

+
+
+
diff --git a/help/en/setScale_cat1.png b/help/en/setScale_cat1.png new file mode 100644 index 0000000000..f15e2fe6c7 Binary files /dev/null and b/help/en/setScale_cat1.png differ diff --git a/help/en/setScale_cat2.png b/help/en/setScale_cat2.png new file mode 100644 index 0000000000..665dd563ae Binary files /dev/null and b/help/en/setScale_cat2.png differ diff --git a/help/en/setScale_cat3.png b/help/en/setScale_cat3.png new file mode 100644 index 0000000000..25d450e9f2 Binary files /dev/null and b/help/en/setScale_cat3.png differ diff --git a/help/en/setSize.png b/help/en/setSize.png new file mode 100755 index 0000000000..16a261ce15 Binary files /dev/null and b/help/en/setSize.png differ diff --git a/help/en/setSize.xml b/help/en/setSize.xml new file mode 100644 index 0000000000..b4af5dbd85 --- /dev/null +++ b/help/en/setSize.xml @@ -0,0 +1,34 @@ + + + + + + + + + + Start leaving a pen trail + Set the pen color to light blue + Set the pen thickness to 20 + Move + + + + + + diff --git a/help/en/setSize_cat.png b/help/en/setSize_cat.png new file mode 100644 index 0000000000..bbe90ef101 Binary files /dev/null and b/help/en/setSize_cat.png differ diff --git a/help/en/setVolume.png b/help/en/setVolume.png new file mode 100755 index 0000000000..32e5c0dec8 Binary files /dev/null and b/help/en/setVolume.png differ diff --git a/help/en/setVolume.xml b/help/en/setVolume.xml new file mode 100644 index 0000000000..e75c448455 --- /dev/null +++ b/help/en/setVolume.xml @@ -0,0 +1,22 @@ + + + + +
Set volume for sounds.
+ + +

+ 100% is the maximum sound possible. + 50% is already quite soft! +

+

+ Each sprite has its own volume, which can be inherited by + clones. +

+
+
+
diff --git a/help/en/setXPosition.png b/help/en/setXPosition.png new file mode 100755 index 0000000000..f991fd40e6 Binary files /dev/null and b/help/en/setXPosition.png differ diff --git a/help/en/setXPosition.xml b/help/en/setXPosition.xml new file mode 100644 index 0000000000..a725e3f9d7 --- /dev/null +++ b/help/en/setXPosition.xml @@ -0,0 +1,57 @@ + + + + + + + + + + Jump to the middle of stage + Wait one second + Jump to the far right edge of stage + Wait one second + Jump to the far left edge of stage + + + + + + + +

+ + + sets the sprite's x position (left to right). Type in a + negative number to make the sprite go to the left side of + the stage. Type in a positive number to go to the right + side of the stage. + +

+
+
+
diff --git a/help/en/setXPosition_range.png b/help/en/setXPosition_range.png new file mode 100644 index 0000000000..f864bfeec1 Binary files /dev/null and b/help/en/setXPosition_range.png differ diff --git a/help/en/setYPosition.png b/help/en/setYPosition.png new file mode 100755 index 0000000000..c5114a6af5 Binary files /dev/null and b/help/en/setYPosition.png differ diff --git a/help/en/setYPosition.xml b/help/en/setYPosition.xml new file mode 100644 index 0000000000..04c4de6b94 --- /dev/null +++ b/help/en/setYPosition.xml @@ -0,0 +1,57 @@ + + + + + + + + + + Jump to the middle of stage + Wait one second + Jump to the top of stage + Wait one second + Jump to the bottom of stage + + + + + + + +

+ + + sets the sprite's y position (up and down). Type in a + negative number to make the sprite go to the bottom half + of the stage. Type in a positive number to go to the top + half of the stage. + +

+
+
+
diff --git a/help/en/setYPosition_range.png b/help/en/setYPosition_range.png new file mode 100644 index 0000000000..f7610ccc19 Binary files /dev/null and b/help/en/setYPosition_range.png differ diff --git a/help/en/show.png b/help/en/show.png new file mode 100644 index 0000000000..e043138502 Binary files /dev/null and b/help/en/show.png differ diff --git a/help/en/show.xml b/help/en/show.xml new file mode 100644 index 0000000000..e05eb215a5 --- /dev/null +++ b/help/en/show.xml @@ -0,0 +1,27 @@ + + + + + + + + + + Makes the sprite disappear + + + + + + Makes the sprite appear again + + + + + diff --git a/help/en/throw.png b/help/en/throw.png new file mode 100644 index 0000000000..6edb9be6cf Binary files /dev/null and b/help/en/throw.png differ diff --git a/help/en/throw.xml b/help/en/throw.xml new file mode 100644 index 0000000000..439490eb4b --- /dev/null +++ b/help/en/throw.xml @@ -0,0 +1,163 @@ + + + + + + +
+ + + +
+ +
+ + + + +
+
+ + + +
Allow early exit from a script.
+ + + + + + + + + + + Done! + + + + + +

+ + The loop was supposed to go until i=10, but the + + + + block jumped out to the matching + + +

+
+
+
+
+ + + + + + + + +

+ Drag the orange tag from the + catch + block to the + throw + block. +

+
+ +

+ + You can change the tag's name by clicking on it + without dragging; then you can nest more than one + + catch + block: +

+
+ + + + + + + + + + + + + + + You can use either tag here! + + + +
+
+
diff --git a/help/en/turn.png b/help/en/turn.png new file mode 100755 index 0000000000..3fe5d20bde Binary files /dev/null and b/help/en/turn.png differ diff --git a/help/en/turn.xml b/help/en/turn.xml new file mode 100644 index 0000000000..d446a9b9f4 --- /dev/null +++ b/help/en/turn.xml @@ -0,0 +1,51 @@ + + + + + + + + + + Rotate this much + + + + + + Rotate the other way + + + + + + + + Go in a circle + + + + + diff --git a/help/en/turnLeft.png b/help/en/turnLeft.png new file mode 100755 index 0000000000..250ef89df0 Binary files /dev/null and b/help/en/turnLeft.png differ diff --git a/help/en/turnLeft.xml b/help/en/turnLeft.xml new file mode 100644 index 0000000000..6c8b6567ad --- /dev/null +++ b/help/en/turnLeft.xml @@ -0,0 +1,51 @@ + + + + + + + + + + Rotate this much + + + + + + Rotate the other way + + + + + + + + Go in a circle + + + + + diff --git a/help/en/up.png b/help/en/up.png new file mode 100644 index 0000000000..787564fdbf Binary files /dev/null and b/help/en/up.png differ diff --git a/help/en/up.xml b/help/en/up.xml new file mode 100644 index 0000000000..27a13643c6 --- /dev/null +++ b/help/en/up.xml @@ -0,0 +1,30 @@ + + + + + + + + + + Start leaving a pen trail + Move + Stop leaving a pen trail + Move + + + + + + diff --git a/help/en/up_cat.png b/help/en/up_cat.png new file mode 100644 index 0000000000..343d156e6d Binary files /dev/null and b/help/en/up_cat.png differ diff --git a/help/en/write.png b/help/en/write.png new file mode 100644 index 0000000000..9197f32617 Binary files /dev/null and b/help/en/write.png differ diff --git a/help/en/write.xml b/help/en/write.xml new file mode 100644 index 0000000000..645eb2c580 --- /dev/null +++ b/help/en/write.xml @@ -0,0 +1,39 @@ + + + + + + + + + +

+ The text slope follows the sprite's direction. The + sprite is left at the end of the text so that you can + find out how long it is. +

+

+ The text is in monospace (Courier) font. +

+
+ +
+
+
+ + + +

If the pen is down, then the text will be underlined.

+
+
+
diff --git a/help/en/write_down.png b/help/en/write_down.png new file mode 100644 index 0000000000..c50095bc8e Binary files /dev/null and b/help/en/write_down.png differ diff --git a/help/en/write_hello.png b/help/en/write_hello.png new file mode 100644 index 0000000000..b5f36d256a Binary files /dev/null and b/help/en/write_hello.png differ diff --git a/help/en/xPosition.png b/help/en/xPosition.png new file mode 100644 index 0000000000..69a5dfbf05 Binary files /dev/null and b/help/en/xPosition.png differ diff --git a/help/en/xPosition.xml b/help/en/xPosition.xml new file mode 100644 index 0000000000..9fd6fd7114 --- /dev/null +++ b/help/en/xPosition.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + If x position is greater than 200 + Then do this + + + + + + + + + +

+ To see this sprite's x position, click the checkbox next + to the block. +

+ + + + +
+
+
+
diff --git a/help/en/xPosition_stage.png b/help/en/xPosition_stage.png new file mode 100644 index 0000000000..194f70dbad Binary files /dev/null and b/help/en/xPosition_stage.png differ diff --git a/help/en/xPosition_watcher.png b/help/en/xPosition_watcher.png new file mode 100644 index 0000000000..509f672e25 Binary files /dev/null and b/help/en/xPosition_watcher.png differ diff --git a/help/en/yPosition.png b/help/en/yPosition.png new file mode 100644 index 0000000000..e989a9a17f Binary files /dev/null and b/help/en/yPosition.png differ diff --git a/help/en/yPosition.xml b/help/en/yPosition.xml new file mode 100644 index 0000000000..aa99a83747 --- /dev/null +++ b/help/en/yPosition.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + If y position is less than -145 + Then do this + + + + + + + + + +

+ To see this sprite's y position, click the checkbox next + to the block. +

+ + + + +
+
+
+
diff --git a/help/en/yPosition_stage.png b/help/en/yPosition_stage.png new file mode 100644 index 0000000000..f991221c10 Binary files /dev/null and b/help/en/yPosition_stage.png differ diff --git a/help/en/yPosition_watcher.png b/help/en/yPosition_watcher.png new file mode 100644 index 0000000000..4fe8b48482 Binary files /dev/null and b/help/en/yPosition_watcher.png differ diff --git a/help/addCustomBlock.png b/help/old/addCustomBlock.png similarity index 100% rename from help/addCustomBlock.png rename to help/old/addCustomBlock.png diff --git a/help/addVariable.png b/help/old/addVariable.png similarity index 100% rename from help/addVariable.png rename to help/old/addVariable.png diff --git a/help/bounceOffEdge.png b/help/old/bounceOffEdge.png similarity index 100% rename from help/bounceOffEdge.png rename to help/old/bounceOffEdge.png diff --git a/help/bubble.png b/help/old/bubble.png similarity index 100% rename from help/bubble.png rename to help/old/bubble.png diff --git a/help/catch.png b/help/old/catch.png similarity index 100% rename from help/catch.png rename to help/old/catch.png diff --git a/help/changeBrightness.png b/help/old/changeBrightness.png similarity index 100% rename from help/changeBrightness.png rename to help/old/changeBrightness.png diff --git a/help/changeEffect.png b/help/old/changeEffect.png similarity index 100% rename from help/changeEffect.png rename to help/old/changeEffect.png diff --git a/help/changePan.png b/help/old/changePan.png similarity index 100% rename from help/changePan.png rename to help/old/changePan.png diff --git a/help/changePenHSVA.png b/help/old/changePenHSVA.png similarity index 100% rename from help/changePenHSVA.png rename to help/old/changePenHSVA.png diff --git a/help/changeScale.png b/help/old/changeScale.png similarity index 100% rename from help/changeScale.png rename to help/old/changeScale.png diff --git a/help/changeSize.png b/help/old/changeSize.png similarity index 100% rename from help/changeSize.png rename to help/old/changeSize.png diff --git a/help/changeVolume.png b/help/old/changeVolume.png similarity index 100% rename from help/changeVolume.png rename to help/old/changeVolume.png diff --git a/help/changeXPosition.png b/help/old/changeXPosition.png similarity index 100% rename from help/changeXPosition.png rename to help/old/changeXPosition.png diff --git a/help/changeYPosition.png b/help/old/changeYPosition.png similarity index 100% rename from help/changeYPosition.png rename to help/old/changeYPosition.png diff --git a/help/clear.png b/help/old/clear.png similarity index 100% rename from help/clear.png rename to help/old/clear.png diff --git a/help/clearEffects.png b/help/old/clearEffects.png similarity index 100% rename from help/clearEffects.png rename to help/old/clearEffects.png diff --git a/help/createClone.png b/help/old/createClone.png similarity index 100% rename from help/createClone.png rename to help/old/createClone.png diff --git a/help/deleteVariable.png b/help/old/deleteVariable.png similarity index 100% rename from help/deleteVariable.png rename to help/old/deleteVariable.png diff --git a/help/direction.png b/help/old/direction.png similarity index 100% rename from help/direction.png rename to help/old/direction.png diff --git a/help/doAddToList.png b/help/old/doAddToList.png similarity index 100% rename from help/doAddToList.png rename to help/old/doAddToList.png diff --git a/help/doAsk.png b/help/old/doAsk.png similarity index 100% rename from help/doAsk.png rename to help/old/doAsk.png diff --git a/help/doBroadcast.png b/help/old/doBroadcast.png similarity index 100% rename from help/doBroadcast.png rename to help/old/doBroadcast.png diff --git a/help/doBroadcastAndWait.png b/help/old/doBroadcastAndWait.png similarity index 100% rename from help/doBroadcastAndWait.png rename to help/old/doBroadcastAndWait.png diff --git a/help/doCallCC.png b/help/old/doCallCC.png similarity index 100% rename from help/doCallCC.png rename to help/old/doCallCC.png diff --git a/help/doChangeTempo.png b/help/old/doChangeTempo.png similarity index 100% rename from help/doChangeTempo.png rename to help/old/doChangeTempo.png diff --git a/help/doChangeVar.png b/help/old/doChangeVar.png similarity index 100% rename from help/doChangeVar.png rename to help/old/doChangeVar.png diff --git a/help/doDeclareVariables.png b/help/old/doDeclareVariables.png similarity index 100% rename from help/doDeclareVariables.png rename to help/old/doDeclareVariables.png diff --git a/help/doDeleteAttr.png b/help/old/doDeleteAttr.png similarity index 100% rename from help/doDeleteAttr.png rename to help/old/doDeleteAttr.png diff --git a/help/doDeleteFromList.png b/help/old/doDeleteFromList.png similarity index 100% rename from help/doDeleteFromList.png rename to help/old/doDeleteFromList.png diff --git a/help/doFaceTowards.png b/help/old/doFaceTowards.png similarity index 100% rename from help/doFaceTowards.png rename to help/old/doFaceTowards.png diff --git a/help/doFor.png b/help/old/doFor.png similarity index 100% rename from help/doFor.png rename to help/old/doFor.png diff --git a/help/doForEach.png b/help/old/doForEach.png similarity index 100% rename from help/doForEach.png rename to help/old/doForEach.png diff --git a/help/doForever.png b/help/old/doForever.png similarity index 100% rename from help/doForever.png rename to help/old/doForever.png diff --git a/help/doGlide.png b/help/old/doGlide.png similarity index 100% rename from help/doGlide.png rename to help/old/doGlide.png diff --git a/help/doGotoObject.png b/help/old/doGotoObject.png similarity index 100% rename from help/doGotoObject.png rename to help/old/doGotoObject.png diff --git a/help/doHideVar.png b/help/old/doHideVar.png similarity index 100% rename from help/doHideVar.png rename to help/old/doHideVar.png diff --git a/help/doIf.png b/help/old/doIf.png similarity index 100% rename from help/doIf.png rename to help/old/doIf.png diff --git a/help/doIfElse.png b/help/old/doIfElse.png similarity index 100% rename from help/doIfElse.png rename to help/old/doIfElse.png diff --git a/help/doInsertInList.png b/help/old/doInsertInList.png similarity index 100% rename from help/doInsertInList.png rename to help/old/doInsertInList.png diff --git a/help/doPauseAll.png b/help/old/doPauseAll.png similarity index 100% rename from help/doPauseAll.png rename to help/old/doPauseAll.png diff --git a/help/doPlayNote.png b/help/old/doPlayNote.png similarity index 100% rename from help/doPlayNote.png rename to help/old/doPlayNote.png diff --git a/help/doPlaySoundAtRate.png b/help/old/doPlaySoundAtRate.png similarity index 100% rename from help/doPlaySoundAtRate.png rename to help/old/doPlaySoundAtRate.png diff --git a/help/doPlaySoundUntilDone.png b/help/old/doPlaySoundUntilDone.png similarity index 100% rename from help/doPlaySoundUntilDone.png rename to help/old/doPlaySoundUntilDone.png diff --git a/help/doRepeat.png b/help/old/doRepeat.png similarity index 100% rename from help/doRepeat.png rename to help/old/doRepeat.png diff --git a/help/doReplaceInList.png b/help/old/doReplaceInList.png similarity index 100% rename from help/doReplaceInList.png rename to help/old/doReplaceInList.png diff --git a/help/doReport.png b/help/old/doReport.png similarity index 100% rename from help/doReport.png rename to help/old/doReport.png diff --git a/help/doResetTimer.png b/help/old/doResetTimer.png similarity index 100% rename from help/doResetTimer.png rename to help/old/doResetTimer.png diff --git a/help/doRest.png b/help/old/doRest.png similarity index 100% rename from help/doRest.png rename to help/old/doRest.png diff --git a/help/doRun.png b/help/old/doRun.png similarity index 100% rename from help/doRun.png rename to help/old/doRun.png diff --git a/help/doSayFor.png b/help/old/doSayFor.png similarity index 100% rename from help/doSayFor.png rename to help/old/doSayFor.png diff --git a/help/doSetFastTracking.png b/help/old/doSetFastTracking.png similarity index 100% rename from help/doSetFastTracking.png rename to help/old/doSetFastTracking.png diff --git a/help/doSetGlobalFlag.png b/help/old/doSetGlobalFlag.png similarity index 100% rename from help/doSetGlobalFlag.png rename to help/old/doSetGlobalFlag.png diff --git a/help/doSetInstrument.png b/help/old/doSetInstrument.png similarity index 100% rename from help/doSetInstrument.png rename to help/old/doSetInstrument.png diff --git a/help/doSetTempo.png b/help/old/doSetTempo.png similarity index 100% rename from help/doSetTempo.png rename to help/old/doSetTempo.png diff --git a/help/doSetVar.png b/help/old/doSetVar.png similarity index 100% rename from help/doSetVar.png rename to help/old/doSetVar.png diff --git a/help/doSetVideoTransparency.png b/help/old/doSetVideoTransparency.png similarity index 100% rename from help/doSetVideoTransparency.png rename to help/old/doSetVideoTransparency.png diff --git a/help/doShowVar.png b/help/old/doShowVar.png similarity index 100% rename from help/doShowVar.png rename to help/old/doShowVar.png diff --git a/help/doStamp.png b/help/old/doStamp.png similarity index 100% rename from help/doStamp.png rename to help/old/doStamp.png diff --git a/help/doStop.png b/help/old/doStop.png similarity index 100% rename from help/doStop.png rename to help/old/doStop.png diff --git a/help/doStopAll.png b/help/old/doStopAll.png similarity index 100% rename from help/doStopAll.png rename to help/old/doStopAll.png diff --git a/help/doStopAllSounds.png b/help/old/doStopAllSounds.png similarity index 100% rename from help/doStopAllSounds.png rename to help/old/doStopAllSounds.png diff --git a/help/doStopBlock.png b/help/old/doStopBlock.png similarity index 100% rename from help/doStopBlock.png rename to help/old/doStopBlock.png diff --git a/help/doStopOthers.png b/help/old/doStopOthers.png similarity index 100% rename from help/doStopOthers.png rename to help/old/doStopOthers.png diff --git a/help/doStopThis.png b/help/old/doStopThis.png similarity index 100% rename from help/doStopThis.png rename to help/old/doStopThis.png diff --git a/help/doSwitchToCostume.png b/help/old/doSwitchToCostume.png similarity index 100% rename from help/doSwitchToCostume.png rename to help/old/doSwitchToCostume.png diff --git a/help/doTellTo.png b/help/old/doTellTo.png similarity index 100% rename from help/doTellTo.png rename to help/old/doTellTo.png diff --git a/help/doThink.png b/help/old/doThink.png similarity index 100% rename from help/doThink.png rename to help/old/doThink.png diff --git a/help/doThinkFor.png b/help/old/doThinkFor.png similarity index 100% rename from help/doThinkFor.png rename to help/old/doThinkFor.png diff --git a/help/doUntil.png b/help/old/doUntil.png similarity index 100% rename from help/doUntil.png rename to help/old/doUntil.png diff --git a/help/doWait.png b/help/old/doWait.png similarity index 100% rename from help/doWait.png rename to help/old/doWait.png diff --git a/help/doWaitUntil.png b/help/old/doWaitUntil.png similarity index 100% rename from help/doWaitUntil.png rename to help/old/doWaitUntil.png diff --git a/help/doWarp.png b/help/old/doWarp.png similarity index 100% rename from help/doWarp.png rename to help/old/doWarp.png diff --git a/help/doWearNextCostume.png b/help/old/doWearNextCostume.png similarity index 100% rename from help/doWearNextCostume.png rename to help/old/doWearNextCostume.png diff --git a/help/down.png b/help/old/down.png similarity index 100% rename from help/down.png rename to help/old/down.png diff --git a/help/evaluate.png b/help/old/evaluate.png similarity index 100% rename from help/evaluate.png rename to help/old/evaluate.png diff --git a/help/evaluateCustomBlock.png b/help/old/evaluateCustomBlock.png similarity index 100% rename from help/evaluateCustomBlock.png rename to help/old/evaluateCustomBlock.png diff --git a/help/floodFill.png b/help/old/floodFill.png similarity index 100% rename from help/floodFill.png rename to help/old/floodFill.png diff --git a/help/fork.png b/help/old/fork.png similarity index 100% rename from help/fork.png rename to help/old/fork.png diff --git a/help/forward.png b/help/old/forward.png similarity index 100% rename from help/forward.png rename to help/old/forward.png diff --git a/help/getCostumeIdx.png b/help/old/getCostumeIdx.png similarity index 100% rename from help/getCostumeIdx.png rename to help/old/getCostumeIdx.png diff --git a/help/getEffect.png b/help/old/getEffect.png similarity index 100% rename from help/getEffect.png rename to help/old/getEffect.png diff --git a/help/getLastMessage.png b/help/old/getLastMessage.png similarity index 100% rename from help/getLastMessage.png rename to help/old/getLastMessage.png diff --git a/help/getPan.png b/help/old/getPan.png similarity index 100% rename from help/getPan.png rename to help/old/getPan.png diff --git a/help/getPenAttribute.png b/help/old/getPenAttribute.png similarity index 100% rename from help/getPenAttribute.png rename to help/old/getPenAttribute.png diff --git a/help/getPenDown.png b/help/old/getPenDown.png similarity index 100% rename from help/getPenDown.png rename to help/old/getPenDown.png diff --git a/help/getScale.png b/help/old/getScale.png similarity index 100% rename from help/getScale.png rename to help/old/getScale.png diff --git a/help/getTempo.png b/help/old/getTempo.png similarity index 100% rename from help/getTempo.png rename to help/old/getTempo.png diff --git a/help/reportTimer.png b/help/old/getTimer.png similarity index 100% rename from help/reportTimer.png rename to help/old/getTimer.png diff --git a/help/getVolume.png b/help/old/getVolume.png similarity index 100% rename from help/getVolume.png rename to help/old/getVolume.png diff --git a/help/goBack.png b/help/old/goBack.png similarity index 100% rename from help/goBack.png rename to help/old/goBack.png diff --git a/help/goToLayer.png b/help/old/goToLayer.png similarity index 100% rename from help/goToLayer.png rename to help/old/goToLayer.png diff --git a/help/gotoXY.png b/help/old/gotoXY.png similarity index 100% rename from help/gotoXY.png rename to help/old/gotoXY.png diff --git a/help/hide.png b/help/old/hide.png similarity index 100% rename from help/hide.png rename to help/old/hide.png diff --git a/help/isObject_type_.png b/help/old/isObject_type_.png similarity index 100% rename from help/isObject_type_.png rename to help/old/isObject_type_.png diff --git a/help/joinwords.png b/help/old/joinwords.png similarity index 100% rename from help/joinwords.png rename to help/old/joinwords.png diff --git a/help/list$arrowRightsentence.png b/help/old/list$arrowRightsentence.png similarity index 100% rename from help/list$arrowRightsentence.png rename to help/old/list$arrowRightsentence.png diff --git a/help/newClone.png b/help/old/newClone.png similarity index 100% rename from help/newClone.png rename to help/old/newClone.png diff --git a/help/playFreq.png b/help/old/playFreq.png similarity index 100% rename from help/playFreq.png rename to help/old/playFreq.png diff --git a/help/playSound.png b/help/old/playSound.png similarity index 100% rename from help/playSound.png rename to help/old/playSound.png diff --git a/help/playSound_.png b/help/old/playSound_.png similarity index 100% rename from help/playSound_.png rename to help/old/playSound_.png diff --git a/help/receiveCondition.png b/help/old/receiveCondition.png similarity index 100% rename from help/receiveCondition.png rename to help/old/receiveCondition.png diff --git a/help/receiveGo.png b/help/old/receiveGo.png similarity index 100% rename from help/receiveGo.png rename to help/old/receiveGo.png diff --git a/help/receiveInteraction.png b/help/old/receiveInteraction.png similarity index 100% rename from help/receiveInteraction.png rename to help/old/receiveInteraction.png diff --git a/help/receiveKey.png b/help/old/receiveKey.png similarity index 100% rename from help/receiveKey.png rename to help/old/receiveKey.png diff --git a/help/receiveMessage.png b/help/old/receiveMessage.png similarity index 100% rename from help/receiveMessage.png rename to help/old/receiveMessage.png diff --git a/help/receiveOnClone.png b/help/old/receiveOnClone.png similarity index 100% rename from help/receiveOnClone.png rename to help/old/receiveOnClone.png diff --git a/help/reifyPredicate.png b/help/old/reifyPredicate.png similarity index 100% rename from help/reifyPredicate.png rename to help/old/reifyPredicate.png diff --git a/help/reifyReporter.png b/help/old/reifyReporter.png similarity index 100% rename from help/reifyReporter.png rename to help/old/reifyReporter.png diff --git a/help/reifyScript.png b/help/old/reifyScript.png similarity index 100% rename from help/reifyScript.png rename to help/old/reifyScript.png diff --git a/help/removeClone.png b/help/old/removeClone.png similarity index 100% rename from help/removeClone.png rename to help/old/removeClone.png diff --git a/help/reportAnd.png b/help/old/reportAnd.png similarity index 100% rename from help/reportAnd.png rename to help/old/reportAnd.png diff --git a/help/reportAskFor.png b/help/old/reportAskFor.png similarity index 100% rename from help/reportAskFor.png rename to help/old/reportAskFor.png diff --git a/help/reportAspect.png b/help/old/reportAspect.png similarity index 100% rename from help/reportAspect.png rename to help/old/reportAspect.png diff --git a/help/reportAtomicCombine.png b/help/old/reportAtomicCombine.png similarity index 100% rename from help/reportAtomicCombine.png rename to help/old/reportAtomicCombine.png diff --git a/help/reportAtomicKeep.png b/help/old/reportAtomicKeep.png similarity index 100% rename from help/reportAtomicKeep.png rename to help/old/reportAtomicKeep.png diff --git a/help/reportAtomicMap.png b/help/old/reportAtomicMap.png similarity index 100% rename from help/reportAtomicMap.png rename to help/old/reportAtomicMap.png diff --git a/help/reportAttributeOf.png b/help/old/reportAttributeOf.png similarity index 100% rename from help/reportAttributeOf.png rename to help/old/reportAttributeOf.png diff --git a/help/reportAudio.png b/help/old/reportAudio.png similarity index 100% rename from help/reportAudio.png rename to help/old/reportAudio.png diff --git a/help/reportBoolean.png b/help/old/reportBoolean.png similarity index 100% rename from help/reportBoolean.png rename to help/old/reportBoolean.png diff --git a/help/reportCDR.png b/help/old/reportCDR.png similarity index 100% rename from help/reportCDR.png rename to help/old/reportCDR.png diff --git a/help/reportCONS.png b/help/old/reportCONS.png similarity index 100% rename from help/reportCONS.png rename to help/old/reportCONS.png diff --git a/help/reportCallCC.png b/help/old/reportCallCC.png similarity index 100% rename from help/reportCallCC.png rename to help/old/reportCallCC.png diff --git a/help/reportColorIsTouchingColor.png b/help/old/reportColorIsTouchingColor.png similarity index 100% rename from help/reportColorIsTouchingColor.png rename to help/old/reportColorIsTouchingColor.png diff --git a/help/reportCombine.png b/help/old/reportCombine.png similarity index 100% rename from help/reportCombine.png rename to help/old/reportCombine.png diff --git a/help/reportDate.png b/help/old/reportDate.png similarity index 100% rename from help/reportDate.png rename to help/old/reportDate.png diff --git a/help/reportDifference.png b/help/old/reportDifference.png similarity index 100% rename from help/reportDifference.png rename to help/old/reportDifference.png diff --git a/help/reportEquals.png b/help/old/reportEquals.png similarity index 100% rename from help/reportEquals.png rename to help/old/reportEquals.png diff --git a/help/reportFalse.png b/help/old/reportFalse.png similarity index 100% rename from help/reportFalse.png rename to help/old/reportFalse.png diff --git a/help/reportFindFirst.png b/help/old/reportFindFirst.png similarity index 100% rename from help/reportFindFirst.png rename to help/old/reportFindFirst.png diff --git a/help/reportGet.png b/help/old/reportGet.png similarity index 100% rename from help/reportGet.png rename to help/old/reportGet.png diff --git a/help/reportGetImageAttribute.png b/help/old/reportGetImageAttribute.png similarity index 100% rename from help/reportGetImageAttribute.png rename to help/old/reportGetImageAttribute.png diff --git a/help/reportGetSoundAttribute.png b/help/old/reportGetSoundAttribute.png similarity index 100% rename from help/reportGetSoundAttribute.png rename to help/old/reportGetSoundAttribute.png diff --git a/help/reportGetVar.png b/help/old/reportGetVar.png similarity index 100% rename from help/reportGetVar.png rename to help/old/reportGetVar.png diff --git a/help/reportGlobalFlag.png b/help/old/reportGlobalFlag.png similarity index 100% rename from help/reportGlobalFlag.png rename to help/old/reportGlobalFlag.png diff --git a/help/reportGreaterThan.png b/help/old/reportGreaterThan.png similarity index 100% rename from help/reportGreaterThan.png rename to help/old/reportGreaterThan.png diff --git a/help/reportIfElse.png b/help/old/reportIfElse.png similarity index 100% rename from help/reportIfElse.png rename to help/old/reportIfElse.png diff --git a/help/reportIsA.png b/help/old/reportIsA.png similarity index 100% rename from help/reportIsA.png rename to help/old/reportIsA.png diff --git a/help/reportIsFastTracking.png b/help/old/reportIsFastTracking.png similarity index 100% rename from help/reportIsFastTracking.png rename to help/old/reportIsFastTracking.png diff --git a/help/reportIsIdentical.png b/help/old/reportIsIdentical.png similarity index 100% rename from help/reportIsIdentical.png rename to help/old/reportIsIdentical.png diff --git a/help/reportJSFunction.png b/help/old/reportJSFunction.png similarity index 100% rename from help/reportJSFunction.png rename to help/old/reportJSFunction.png diff --git a/help/reportJoinWords.png b/help/old/reportJoinWords.png similarity index 100% rename from help/reportJoinWords.png rename to help/old/reportJoinWords.png diff --git a/help/reportKeep.png b/help/old/reportKeep.png similarity index 100% rename from help/reportKeep.png rename to help/old/reportKeep.png diff --git a/help/reportKeyPressed.png b/help/old/reportKeyPressed.png similarity index 100% rename from help/reportKeyPressed.png rename to help/old/reportKeyPressed.png diff --git a/help/reportLastAnswer.png b/help/old/reportLastAnswer.png similarity index 100% rename from help/reportLastAnswer.png rename to help/old/reportLastAnswer.png diff --git a/help/reportLessThan.png b/help/old/reportLessThan.png similarity index 100% rename from help/reportLessThan.png rename to help/old/reportLessThan.png diff --git a/help/reportLetter.png b/help/old/reportLetter.png similarity index 100% rename from help/reportLetter.png rename to help/old/reportLetter.png diff --git a/help/reportListContainsItem.png b/help/old/reportListContainsItem.png similarity index 100% rename from help/reportListContainsItem.png rename to help/old/reportListContainsItem.png diff --git a/help/reportListIsEmpty.png b/help/old/reportListIsEmpty.png similarity index 100% rename from help/reportListIsEmpty.png rename to help/old/reportListIsEmpty.png diff --git a/help/reportListItem.png b/help/old/reportListItem.png similarity index 100% rename from help/reportListItem.png rename to help/old/reportListItem.png diff --git a/help/reportListLength.png b/help/old/reportListLength.png similarity index 100% rename from help/reportListLength.png rename to help/old/reportListLength.png diff --git a/help/reportMap.png b/help/old/reportMap.png similarity index 100% rename from help/reportMap.png rename to help/old/reportMap.png diff --git a/help/reportModulus.png b/help/old/reportModulus.png similarity index 100% rename from help/reportModulus.png rename to help/old/reportModulus.png diff --git a/help/reportMonadic.png b/help/old/reportMonadic.png similarity index 100% rename from help/reportMonadic.png rename to help/old/reportMonadic.png diff --git a/help/reportMouseDown.png b/help/old/reportMouseDown.png similarity index 100% rename from help/reportMouseDown.png rename to help/old/reportMouseDown.png diff --git a/help/reportMouseX.png b/help/old/reportMouseX.png similarity index 100% rename from help/reportMouseX.png rename to help/old/reportMouseX.png diff --git a/help/reportMouseY.png b/help/old/reportMouseY.png similarity index 100% rename from help/reportMouseY.png rename to help/old/reportMouseY.png diff --git a/help/reportNewCostumeStretched.png b/help/old/reportNewCostumeStretched.png similarity index 100% rename from help/reportNewCostumeStretched.png rename to help/old/reportNewCostumeStretched.png diff --git a/help/reportNewList.png b/help/old/reportNewList.png similarity index 100% rename from help/reportNewList.png rename to help/old/reportNewList.png diff --git a/help/reportNot.png b/help/old/reportNot.png similarity index 100% rename from help/reportNot.png rename to help/old/reportNot.png diff --git a/help/reportNumbers.png b/help/old/reportNumbers.png similarity index 100% rename from help/reportNumbers.png rename to help/old/reportNumbers.png diff --git a/help/reportObject.png b/help/old/reportObject.png similarity index 100% rename from help/reportObject.png rename to help/old/reportObject.png diff --git a/help/reportOr.png b/help/old/reportOr.png similarity index 100% rename from help/reportOr.png rename to help/old/reportOr.png diff --git a/help/reportPenTrailsAsCostume.png b/help/old/reportPenTrailsAsCostume.png similarity index 100% rename from help/reportPenTrailsAsCostume.png rename to help/old/reportPenTrailsAsCostume.png diff --git a/help/reportPower.png b/help/old/reportPower.png similarity index 100% rename from help/reportPower.png rename to help/old/reportPower.png diff --git a/help/reportProduct.png b/help/old/reportProduct.png similarity index 100% rename from help/reportProduct.png rename to help/old/reportProduct.png diff --git a/help/reportQuotient.png b/help/old/reportQuotient.png similarity index 100% rename from help/reportQuotient.png rename to help/old/reportQuotient.png diff --git a/help/reportRandom.png b/help/old/reportRandom.png similarity index 100% rename from help/reportRandom.png rename to help/old/reportRandom.png diff --git a/help/reportRelationTo.png b/help/old/reportRelationTo.png similarity index 100% rename from help/reportRelationTo.png rename to help/old/reportRelationTo.png diff --git a/help/reportRound.png b/help/old/reportRound.png similarity index 100% rename from help/reportRound.png rename to help/old/reportRound.png diff --git a/help/reportShown.png b/help/old/reportShown.png similarity index 100% rename from help/reportShown.png rename to help/old/reportShown.png diff --git a/help/reportStringSize.png b/help/old/reportStringSize.png similarity index 100% rename from help/reportStringSize.png rename to help/old/reportStringSize.png diff --git a/help/reportSum.png b/help/old/reportSum.png similarity index 100% rename from help/reportSum.png rename to help/old/reportSum.png diff --git a/help/reportTextSplit.png b/help/old/reportTextSplit.png similarity index 100% rename from help/reportTextSplit.png rename to help/old/reportTextSplit.png diff --git a/help/reportTouchingColor.png b/help/old/reportTouchingColor.png similarity index 100% rename from help/reportTouchingColor.png rename to help/old/reportTouchingColor.png diff --git a/help/reportTouchingObject.png b/help/old/reportTouchingObject.png similarity index 100% rename from help/reportTouchingObject.png rename to help/old/reportTouchingObject.png diff --git a/help/reportTrue.png b/help/old/reportTrue.png similarity index 100% rename from help/reportTrue.png rename to help/old/reportTrue.png diff --git a/help/reportURL.png b/help/old/reportURL.png similarity index 100% rename from help/reportURL.png rename to help/old/reportURL.png diff --git a/help/reportUnicode.png b/help/old/reportUnicode.png similarity index 100% rename from help/reportUnicode.png rename to help/old/reportUnicode.png diff --git a/help/reportUnicodeAsLetter.png b/help/old/reportUnicodeAsLetter.png similarity index 100% rename from help/reportUnicodeAsLetter.png rename to help/old/reportUnicodeAsLetter.png diff --git a/help/reportVideo.png b/help/old/reportVideo.png similarity index 100% rename from help/reportVideo.png rename to help/old/reportVideo.png diff --git a/help/sentence$arrowRightlist.png b/help/old/sentence$arrowRightlist.png similarity index 100% rename from help/sentence$arrowRightlist.png rename to help/old/sentence$arrowRightlist.png diff --git a/help/setBrightness.png b/help/old/setBrightness.png similarity index 100% rename from help/setBrightness.png rename to help/old/setBrightness.png diff --git a/help/setColor.png b/help/old/setColor.png similarity index 100% rename from help/setColor.png rename to help/old/setColor.png diff --git a/help/setEffect.png b/help/old/setEffect.png similarity index 100% rename from help/setEffect.png rename to help/old/setEffect.png diff --git a/help/setHeading.png b/help/old/setHeading.png similarity index 100% rename from help/setHeading.png rename to help/old/setHeading.png diff --git a/help/setPan.png b/help/old/setPan.png similarity index 100% rename from help/setPan.png rename to help/old/setPan.png diff --git a/help/setPenHSVA.png b/help/old/setPenHSVA.png similarity index 100% rename from help/setPenHSVA.png rename to help/old/setPenHSVA.png diff --git a/help/setScale.png b/help/old/setScale.png similarity index 100% rename from help/setScale.png rename to help/old/setScale.png diff --git a/help/setSize.png b/help/old/setSize.png similarity index 100% rename from help/setSize.png rename to help/old/setSize.png diff --git a/help/setVolume.png b/help/old/setVolume.png similarity index 100% rename from help/setVolume.png rename to help/old/setVolume.png diff --git a/help/setXPosition.png b/help/old/setXPosition.png similarity index 100% rename from help/setXPosition.png rename to help/old/setXPosition.png diff --git a/help/setYPosition.png b/help/old/setYPosition.png similarity index 100% rename from help/setYPosition.png rename to help/old/setYPosition.png diff --git a/help/show.png b/help/old/show.png similarity index 100% rename from help/show.png rename to help/old/show.png diff --git a/help/stopFreq.png b/help/old/stopFreq.png similarity index 100% rename from help/stopFreq.png rename to help/old/stopFreq.png diff --git a/help/throw.png b/help/old/throw.png similarity index 100% rename from help/throw.png rename to help/old/throw.png diff --git a/help/turn.png b/help/old/turn.png similarity index 100% rename from help/turn.png rename to help/old/turn.png diff --git a/help/turnLeft.png b/help/old/turnLeft.png similarity index 100% rename from help/turnLeft.png rename to help/old/turnLeft.png diff --git a/help/up.png b/help/old/up.png similarity index 100% rename from help/up.png rename to help/old/up.png diff --git a/help/write.png b/help/old/write.png similarity index 100% rename from help/write.png rename to help/old/write.png diff --git a/help/xPosition.png b/help/old/xPosition.png similarity index 100% rename from help/xPosition.png rename to help/old/xPosition.png diff --git a/help/yPosition.png b/help/old/yPosition.png similarity index 100% rename from help/yPosition.png rename to help/old/yPosition.png diff --git a/libraries/LIBRARIES b/libraries/LIBRARIES index 8eec88943c..7e2fccbb35 100644 --- a/libraries/LIBRARIES +++ b/libraries/LIBRARIES @@ -24,3 +24,4 @@ make-variables.xml create variables in program declare global or sprite-local va json.xml Deal with JSON data Turn JSON strings into lists with the listify block, then retrieve data out of them by using the value at key block. parallel_module.xml Parallelization Run several scripts in parallel and wait until all are done. strings.xml String processing Extract substrings of a string in various ways +help_translator.xml Help translator Utility for creating and translating help screens diff --git a/libraries/help.js b/libraries/help.js new file mode 100644 index 0000000000..213ea099ee --- /dev/null +++ b/libraries/help.js @@ -0,0 +1,1654 @@ +/* + + help.js + + help screen translator for Snap! + + written by Dylan Servilla + + Copyright (C) 2019 by Dylan Servilla + + This file is part of Snap! Help Translator library. + + Snap! is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +*/ + +// HelpScreenMorph ////////////////////////////////////////////////////// + +// HelpScreenMorph inherits from FrameMorph: + +HelpScreenMorph.prototype = new FrameMorph(); +HelpScreenMorph.prototype.constructor = HelpScreenMorph; +HelpScreenMorph.uber = FrameMorph.prototype; + +// HelpScreenMorph layout settings: + +HelpScreenMorph.prototype.screenWidth = 572; +HelpScreenMorph.prototype.padding = 15; +HelpScreenMorph.prototype.verticalPadding = 10; +HelpScreenMorph.prototype.font = 'Baskerville, "Libre Baskerville"'; + +// HelpScreenMorph library caching: + +HelpScreenMorph.prototype.libraryCache = {}; + +// HelpScreenMorph instance creation: + +function HelpScreenMorph(loadCallback) { + this.init(loadCallback); +} + +HelpScreenMorph.prototype.init = function (loadCallback) { + // additional properties: + this.thumbnail = null; + this.imagesLoading = 0; + this.loadCallback = loadCallback; + + // initialize inherited properties: + HelpScreenMorph.uber.init.call(this); + this.setWidth(HelpScreenMorph.prototype.screenWidth - this.padding); + this.color = DialogBoxMorph.prototype.color; +}; + +HelpScreenMorph.prototype.fixLayout = function () { + var myself = this, padding = this.padding, + verticalPadding = this.verticalPadding, nextY = verticalPadding, + headerLineHeight; + + this.add(this.thumbnail); + this.thumbnail.fixLayout(); + if (this.header) { + this.add(this.header); + this.header.setLeft(this.thumbnail.right() + padding); + this.header.setWidth( + this.right() - this.header.left() - padding + ); + headerLineHeight = this.header instanceof RichTextMorph + ? this.header.calculateLineHeight(this.header.lines[0]) + : fontHeight(this.header.fontSize); + this.header.setTop( + verticalPadding + (this.thumbnail.height() - verticalPadding) / 2 + - headerLineHeight / 2 + ); + } + + this.children.forEach(function (child) { + if (child instanceof HelpBoxMorph && child !== myself.thumbnail) { + child.moveBy(new Point(0, nextY)); + child.fixLayout(); + nextY += child.height() + verticalPadding; + } + }); + this.setHeight(nextY - verticalPadding); +}; + +HelpScreenMorph.prototype.createThumbnail = function () { + return new HelpBoxMorph('blue', true); +}; + +HelpScreenMorph.prototype.createBox = function (color) { + return new HelpBoxMorph(color); +}; + +HelpScreenMorph.prototype.createColumn = function () { + var col = new AlignmentMorph('column', this.padding); + col.alignment = 'left'; + col.padding = this.verticalPadding; + return col; +}; + +HelpScreenMorph.prototype.createRow = function () { + var row = new AlignmentMorph('row', this.padding); + row.alignment = 'top'; + row.padding = this.padding; + return row; +}; + +HelpScreenMorph.prototype.createParagraph = function ( + str, size, font, color, bold, italic +) { + var text = new TextMorph( + str, size, 'serif', bold, italic, null, null, font + ); + text.color = color; + return text; +}; + +HelpScreenMorph.prototype.createRichParagraph = function ( + str, size, font, color, bold, italic +) { + var text = new RichTextMorph( + str, size, 'serif', bold, italic, null, null, font + ); + text.color = color; + return text; +}; + +HelpScreenMorph.prototype.createScriptDiagram = function ( + script, annotations, menus, bubbles, defaultArrowColor +) { + return new ScriptDiagramMorph( + script, annotations, menus, bubbles, defaultArrowColor + ); +}; + +HelpScreenMorph.prototype.createImage = function (src, width, height) { + var myself = this; + this.imagesLoading += 1; + return new ImageMorph( + src, width, height, + function (img) { + myself.imageLoaded(); + }, + function () { + myself.loadCallback(new Error('could not load image ' + src)); + } + ); +}; + +HelpScreenMorph.prototype.imageLoaded = function () { + this.imagesLoading -= 1; + if (this.imagesLoading === 0) { + this.loadCallback(null, this); + } +}; + +HelpScreenMorph.prototype.createMenu = function (items, noEmptyOption) { + var dict = {}, input = new InputSlotMorph(), + morph, i, item, itemMorph, tempParent; + items.forEach(function (item) { + if (item.tag === 'line') { + dict['~'] = null; + } else if (item.tag === 'item') { + if (item.contents === '§_dir') { + // direction picker takes its color from its input's parent + tempParent = new Morph(); + tempParent.setColor( + SpriteMorph.prototype.blockColor.motion + ); + tempParent.add(input); + } + dict[item.contents] = null; + } + }); + morph = input.menuFromDict(dict, noEmptyOption); + morph.drawNew(); + for (i = 0; i < items.length; i++) { + item = items[i]; + itemMorph = morph.children[noEmptyOption ? i : i + 1]; + if (item.attributes.color) { + itemMorph.setColor(item.attributes.color); + } + if (item.attributes.annotation) { + itemMorph.annotationID = item.attributes.annotation; + } + } + morph.adjustWidths(); + return morph; +}; + +// HelpScreenMorph library caching (modified from LibraryImportDialogMorph): + +HelpScreenMorph.prototype.hasCachedLibrary = function (key) { + return HelpScreenMorph.prototype.libraryCache.hasOwnProperty(key); +}; + +HelpScreenMorph.prototype.cacheLibrary = function (key, blocks) { + HelpScreenMorph.prototype.libraryCache[key] = blocks ; +}; + +HelpScreenMorph.prototype.cachedLibrary = function (key) { + return HelpScreenMorph.prototype.libraryCache[key]; +}; + +HelpScreenMorph.prototype.loadLibrary = function (fileName, callback) { + var myself = this; + if (this.hasCachedLibrary(fileName)) { + callback(this.cachedLibrary(fileName)); + } else { + IDE_Morph.prototype.getURL( + IDE_Morph.prototype.resourceURL('libraries', fileName), + function(libraryXML) { + var blocks = new SnapSerializer().loadBlocks(libraryXML); + myself.cacheLibrary(fileName, blocks); + callback(blocks); + } + ); + } +}; + +// SnapSerializer /////////////////////////////////////////////////////////// + +SnapSerializer.prototype.loadHelpScreen = function (xmlString, callback) { + // public - answer the HelpScreenMorph represented by xmlString + var myself = this, + model = this.parse(xmlString), + helpScreen = new HelpScreenMorph(callback), + stage = new StageMorph(), + target = new SpriteMorph(), + blocks, + libraries; + + this.project.stage = stage; + target.globalBlocks = this.project.stage.globalBlocks; + + if (+model.attributes.version > this.version) { + throw 'Module uses newer version of Serializer'; + } + + blocks = model.childNamed('blocks'); + if (blocks) { + myself.loadCustomBlocks(target, blocks, true); + myself.populateCustomBlocks(target, blocks, true); + } + + libraries = model.childNamed('libraries'); + if (libraries && libraries.children.length > 0) { + loadLibrary(0); + } else { + librariesLoaded(); + } + + function loadLibrary (index) { + var el = libraries.children[index]; + if (el) { + if (el.tag === 'library' && el.attributes.filename) { + helpScreen.loadLibrary(el.attributes.filename, function (blocks) { + blocks.forEach(function (def) { + def.receiver = stage; + stage.globalBlocks.push(def); + stage.replaceDoubleDefinitionsFor(def); + }); + loadLibrary(index + 1); + }); + } else { + loadLibrary(index + 1); + } + } else { + librariesLoaded(); + } + } + + function librariesLoaded () { + model.children.forEach(function (child) { + var morph; + if (child.tag === 'blocks' || child.tag === 'libraries') { + return; + } + morph = myself.loadHelpScreenElement( + child, helpScreen, target, helpScreen.font, 'white' + ); + if (child.tag === 'thumbnail') { + helpScreen.thumbnail = morph; + } else if ( + child.tag === 'header' || child.tag === 'small-header' + ) { + helpScreen.header = morph; + } else if (morph) { + helpScreen.add(morph); + } + }); + + helpScreen.fixLayout(); + + if (helpScreen.imagesLoading === 0) { + callback(null, helpScreen); + } + } +}; + +SnapSerializer.prototype.loadHelpScreenElement = function ( + element, screen, target, textFont, textColor +) { + var myself = this, morph, customBlock, script, textSize, bold, italic, + smallTextTags = ['small-header', 'small-p', 'small-i'], + boldTextTags = ['header', 'small-header'], + italicTextTags = ['i', 'small-i']; + + function normalizeWhitespace(text) { + return text.trim().replace(/\s+/g, ' ') // collapse whitespace + .replace(/\s*\\n\s*/g, '\n'); // replace \n with newline + } + + switch (element.tag) { + case 'block-definition': + customBlock = detect(target.globalBlocks, function (block) { + return block.blockSpec() === element.attributes.s; + }); + morph = new PrototypeHatBlockMorph(customBlock); + morph.nextBlock(customBlock.body.expression); + morph.fixBlockColor(null, true); // force zebra coloring + break; + case 'bool': + return element.contents === 'true'; + case 'box': + morph = screen.createBox(element.attributes.color); + textColor = element.attributes.color === 'blue' + ? 'black' : 'white'; + break; + case 'column': + morph = screen.createColumn(); + break; + case 'diagram': + script = myself.loadHelpScreenElement( + element.childNamed('block-definition') + || element.childNamed('menu') + || element.require('script'), + screen, target, textFont, textColor + ); + morph = screen.createScriptDiagram( + script, + element.childNamed('annotations') + ? element.require('annotations').children.map( + function (child) { + var morph = myself.loadHelpScreenElement( + child, screen, target, textFont, textColor + ); + myself.handleAnnotations(child, morph); + return morph; + } + ) : [], + element.childNamed('menus') + ? element.childNamed('menus').children.map(function (child) { + return myself.loadHelpScreenElement( + child, screen, target, textFont, textColor + ); + }) + : [], + element.childNamed('bubbles') + ? element.childNamed('bubbles').children.map(function (child) { + return myself.loadHelpScreenElement( + child, screen, target, textFont, textColor + ); + }) + : [], + textColor + ); + break; + case 'img': + morph = screen.createImage( + element.attributes.src, + +element.attributes.width, + +element.attributes.height + ); + break; + case 'menu': + morph = screen.createMenu( + element.children, + element.attributes['no-empty-option'] + ); + break; + case 'header': + case 'small-header': + case 'p': + case 'small-p': + case 'i': + case 'small-i': + if (element.attributes.color) { + textColor = element.attributes.color; + } + if (element.attributes.font) { + textFont = element.attributes.font; + } + textSize = contains(smallTextTags, element.tag) + ? 14 : 18; + bold = contains(boldTextTags, element.tag); + italic = contains(italicTextTags, element.tag); + if (element.children.length === 0) { + morph = screen.createParagraph( + normalizeWhitespace(element.contents), + textSize, textFont, textColor, bold, italic + ); + } else { + morph = screen.createRichParagraph( + null, textSize, textFont, textColor, bold, italic + ); + morph.text = element.children.map(function (child) { + return myself.loadHelpScreenElement( + child, screen, target, textFont, textColor + ); + }); + morph.drawNew(); + } + break; + case 'row': + morph = screen.createRow(); + break; + case 'script': + morph = this.loadScript(element, target); + morph.fixBlockColor(null, true); // force zebra coloring + break; + case 'text': + return element.attributes.font || element.attributes.color + ? { + text: normalizeWhitespace(element.contents), + font: element.attributes.font, + color: element.attributes.color + } : normalizeWhitespace(element.contents); + case 'thumbnail': + morph = screen.createThumbnail(); + break; + } + if (morph) { + if (morph instanceof BlockMorph && element.attributes.scale) { + morph.scriptScale = +element.attributes.scale; + } + if ( + morph instanceof BlockMorph + && (!element.parent || element.parent.tag !== 'diagram') + ) { + // contain BlockMorphs in diagrams so they can be scaled + morph = screen.createScriptDiagram(morph, [], [], [], textColor); + } + if ( + morph instanceof AlignmentMorph + || morph instanceof HelpBoxMorph + || morph instanceof ScriptDiagramMorph + || morph instanceof TextMorph + ) { + if (element.attributes['width']) { + morph.silentSetWidth(+element.attributes['width']); + morph.relativeWidth = 0; + } else if (element.attributes['rel-width']) { + // width will be adjusted later + morph.relativeWidth = +element.attributes['rel-width'] || 1; + } else if ( + morph instanceof ScriptDiagramMorph + && morph.annotations.length === 0 + ) { + // consider script diagrams to have a fixed width if there + // are no annotations, and not manually given a rel-width + morph.relativeWidth = 0; + } else { + // default to 1 + morph.relativeWidth = 1; + } + } + if (morph instanceof AlignmentMorph && element.attributes.padding) { + morph.padding = +element.attributes.padding; + } + if (element.attributes.x) { + morph.shiftRight = +element.attributes.x; + } + if (element.attributes.y) { + morph.shiftDown = +element.attributes.y; + } + if ( + !(morph instanceof RichTextMorph + || morph instanceof ScriptDiagramMorph) + ) { + // add children + element.children.forEach(function (child) { + var childMorph = myself.loadHelpScreenElement( + child, screen, target, textFont, textColor + ); + if (childMorph) { + morph.add(childMorph); + } + }); + } + } + return morph; +}; + +SnapSerializer.prototype.handleAnnotations = function (model, morph) { + if (model.attributes['annotation']) { + morph.annotationID = model.attributes['annotation']; + } + if (model.attributes['menu']) { + morph.annotationMenu = model.attributes['menu']; + } + if (model.attributes['arrow-start']) { + morph.annotationArrowStart = model.attributes['arrow-start']; + } + if (model.attributes['arrow-end']) { + morph.annotationArrowEnd = model.attributes['arrow-end']; + } + if (model.attributes['arrow-reverse']) { + morph.annotationArrowReverse = model.attributes['arrow-reverse']; + } + if (model.attributes['arrow-detour']) { + morph.annotationArrowDetour = +model.attributes['arrow-detour'] || 0; + } + if (model.attributes['arrow-horizontal']) { + morph.annotationArrowHorizontal = model.attributes['arrow-horizontal'] === 'true'; + } + if (model.attributes['arrow-color']) { + morph.annotationArrowColor = model.attributes['arrow-color']; + } + if (model.attributes['bubble']) { + morph.annotationBubble = model.attributes['bubble']; + } + if (model.attributes['highlight']) { + morph.annotationHighlight = model.attributes['highlight'] === 'true'; + } + if (model.attributes['ghost']) { + morph.annotationGhost = model.attributes['ghost'] === 'true'; + } +}; + +SnapSerializer.prototype.loadBlockOld = SnapSerializer.prototype.loadBlock; +SnapSerializer.prototype.loadBlock = function (model, isReporter, object) { + var myself = this, + block = this.loadBlockOld(model, isReporter, object), + migration, migrationOffset = 0, inputs; + this.handleAnnotations(model, block); + if (model.tag === 'block' && model.attributes.s) { + migration = SpriteMorph.prototype.blockMigrations[ + model.attributes.s + ]; + if (migration) { + migrationOffset = migration.offset; + } + } + inputs = block.inputs(); + model.children.forEach(function (child, i) { + var input = inputs[i + migrationOffset], inputs2; + if (!contains(['variables', 'comment', 'receiver'], child.tag)) { + myself.handleAnnotations(child, input); + } + if (child.tag === 'list') { + inputs2 = input.inputs(); + child.children.forEach(function (child2, i) { + myself.handleAnnotations(child2, inputs2[i]); + }); + } + }, this); + return block; +}; + +// HelpBoxMorph ///////////////////////////////////////////////////////////// + +HelpBoxMorph.prototype = new BoxMorph(); +HelpBoxMorph.prototype.constructor = HelpBoxMorph; +HelpBoxMorph.uber = BoxMorph.prototype; + +function HelpBoxMorph(color, isThumbnail) { + this.init(color, isThumbnail); +} + +HelpBoxMorph.prototype.init = function (color, isThumbnail) { + // initialize inherited properties: + HelpBoxMorph.uber.init.call(this); + + this.setColorName(color); + this.isThumbnail = isThumbnail || false; +}; + +HelpBoxMorph.prototype.setColorName = function (color) { + if (color === this.colorName) { + return; + } + this.colorName = color; + if (color === 'blue') { + this.color = new Color(214, 225, 235); + this.borderColor = new Color(153, 156, 158); + } else if (color === 'black') { + this.color = new Color(50, 52, 54); + this.borderColor = new Color(153, 156, 158); + } else { // gray is default + this.color = new Color(133, 138, 140); + this.borderColor = new Color(183, 186, 188); + } +}; + +HelpBoxMorph.prototype.fixChildrenExtents = function () { + var screen = this.parentThatIsA(HelpScreenMorph), + padding = screen.padding; + + function fixWidth (morph) { + var parent = morph.parent, maxWidth; + + if (morph.isThumbnail || morph === screen.header) { + return; + } + + if ( + morph instanceof AlignmentMorph + || morph instanceof HelpBoxMorph + || morph instanceof ScriptDiagramMorph + || morph instanceof TextMorph + ) { + if ( + morph.relativeWidth != null + && parent instanceof AlignmentMorph + && parent.orientation === 'row' + ) { + if (morph.relativeWidth !== 0) { + if (morph instanceof AlignmentMorph) { + morph.fixLayout(); + } + maxWidth = morph.relativeWidth + / parent.relWidthDenominator + * (parent.width() - parent.usedWidth); + if ( + morph instanceof TextMorph + && morph.width() <= maxWidth + ) { + parent.usedWidth += morph.width(); + parent.relWidthDenominator -= morph.relativeWidth; + morph.relativeWidth = 0; + } else { + morph.silentSetWidth(maxWidth); + } + } + } else if (parent instanceof HelpBoxMorph) { + morph.silentSetWidth(parent.width() - 2 * padding); + } else { + morph.silentSetWidth(parent.width()); + } + } + if (morph instanceof AlignmentMorph && morph.orientation === 'row') { + // calculate the total known used width of row items + morph.usedWidth = morph.padding * (morph.children.length - 1) + + morph.children.reduce( + function (width, child) { + if (child.relativeWidth) { + return width; + } else if (child instanceof BlockMorph) { + return width + + child.stackFullBounds().width(); + } else { + return width + child.width(); + } + }, 0 + ); + morph.relWidthDenominator = morph.children.reduce( + function (width, child) { + return width + (child.relativeWidth || 0); + }, 0 + ); + } + if ( + morph instanceof AlignmentMorph + || morph instanceof HelpBoxMorph + ) { + morph.children.forEach(fixWidth); + } + } + + function fixHeight (morph) { + if (morph instanceof AlignmentMorph) { + if (morph.orientation === 'row') { + // height of boxes depends on the height of other row items + morph.children.forEach(function (child) { + if (!(child instanceof HelpBoxMorph)) { + fixHeight(child); + } + }); + morph.fixLayout(); + morph.children.forEach(function (child) { + if (child instanceof HelpBoxMorph) { + fixHeight(child); + } + }); + morph.fixLayout(); + } else { + morph.children.forEach(fixHeight); + morph.fixLayout(); + } + } else if ( + morph instanceof HelpBoxMorph + || morph instanceof ScriptDiagramMorph + ) { + morph.fixLayout(); + } + } + + if (!this.isThumbnail) { + this.children.forEach(fixWidth); + } + this.forAllChildren(function (child) { + // Reflow rich text + if (child instanceof TextMorph) { + child.children.forEach(function (child) { + if (typeof child.fixLayout === 'function') { + child.fixLayout(); + } + }); + child.setWidth(child.width()); + } + }); + this.children.forEach(fixHeight); +}; + +HelpBoxMorph.prototype.fixLayout = function () { + var screen = this.parentThatIsA(HelpScreenMorph), + padding = screen.padding, myself = this, + startX, startY, width = 0, height = 0; + + if (this.parent instanceof HelpScreenMorph && !this.isThumbnail) { + this.setWidth(this.parent.width()); + } + this.fixChildrenExtents(); + startX = this.left(); + startY = this.top(); + this.children.forEach(function (child) { + child.moveBy(new Point ( + (child.shiftRight || 0) + padding, + (child.shiftDown || 0) + padding + )); + if (myself.parent === screen && !myself.isThumbnail) { + if (child.right() > myself.right()) { + child.setWidth(myself.right() - padding - child.left()); + } + if (child.top() < screen.thumbnail.bottom() + padding) { + child.setTop(screen.thumbnail.bottom() + padding); + } + if ( + screen.header + && child.top() < screen.header.bottom() + padding + ) { + child.setTop(screen.header.bottom() + padding); + } + } + width = Math.max(width, child.right() - startX); + height = Math.max(height, child.bottom() - startY); + }); + if (this.isThumbnail) { + this.setWidth(width + padding); + } + if ( + this.parent instanceof AlignmentMorph + && this.parent.orientation === 'row' + ) { + this.setHeight(Math.max(height + padding, this.parent.height())); + } else { + this.setHeight(height + padding); + } +}; + +// ImageMorph /////////////////////////////////////////////////////////////// + +ImageMorph.prototype = new Morph(); +ImageMorph.prototype.constructor = ImageMorph; +ImageMorph.uber = Morph.prototype; + +function ImageMorph(src, width, height, onload, onerror) { + this.init(src, width, height, onload, onerror); +} + +ImageMorph.prototype.init = function (src, width, height, onload, onerror) { + var myself = this; + + // initialize inherited properties: + ImageMorph.uber.init.call(this); + + this.diagram = null; + this.setExtent(new Point(width, height)); + this.pic = new Image(); + this.pic.onload = function () { + myself.drawNew(); + myself.changed(); + if (myself.diagram) { + // redraw containing diagram + myself.diagram.drawNew(); + } + if (typeof onload === 'function') { + onload(); + } + }; + this.pic.onerror = function () { + if (typeof onerror === 'function') { + onerror(); + } + }; + this.pic.src = IDE_Morph.prototype.resourceURL( + 'help', SnapTranslator.language, src + '?t=' + Date.now() + ); +}; + +ImageMorph.prototype.drawNew = function () { + var ctx; + this.image = newCanvas(this.extent()); + ctx = this.image.getContext('2d'); + if (this.pic) { + ctx.drawImage(this.pic, 0, 0, this.width(), this.height()); + } +}; + +// RichTextMorph //////////////////////////////////////////////////////////// + +// I am a multi-line, word-wrapping String that can have other morphs inlined + +// RichTextMorph inherits from TextMorph: + +RichTextMorph.prototype = new TextMorph(); +RichTextMorph.prototype.constructor = RichTextMorph; +RichTextMorph.uber = TextMorph.prototype; + +// RichTextMorph instance creation: + +function RichTextMorph( + text, + fontSize, + fontStyle, + bold, + italic, + alignment, + width, + fontName, + shadowOffset, + shadowColor +) { + this.init(text, + fontSize, + fontStyle, + bold, + italic, + alignment, + width, + fontName, + shadowOffset, + shadowColor); +} + +RichTextMorph.prototype.init = function ( + text, + fontSize, + fontStyle, + bold, + italic, + alignment, + width, + fontName, + shadowOffset, + shadowColor +) { + // initialize inherited properties: + RichTextMorph.uber.init.call(this, + text || ['RichTextMorph'], + fontSize, + fontStyle, + bold, + italic, + alignment, + width, + fontName, + shadowOffset, + shadowColor); +}; + +RichTextMorph.prototype.toString = function () { + // e.g. 'a RichTextMorph("Hello World")' + return 'a RichTextMorph' + '("' + this.text.join(' ').slice(0, 30) + '...")'; +}; + +RichTextMorph.prototype.parse = function () { + var myself = this, + canvas = newCanvas(), + context = canvas.getContext('2d'), + line = [], + lineWidth = 0, + w, + prependSpace = false, + nextWord; + + context.font = this.font(); + this.maxLineWidth = 0; + this.lines = []; + this.words = []; + + this.text.forEach(function (item) { + var paragraphs, i, p; + if (item instanceof Morph) { + myself.words.push(item); + if (item.parent !== this) { + myself.add(item); + } + } else { + paragraphs = (item.text || item).split('\n'); + for (i = 0; i < paragraphs.length; i++) { + p = paragraphs[i]; + myself.words = myself.words.concat( + p.split(' ').map(function (word) { + return item.font || item.color + ? { + text: word, + font: item.font, + color: item.color + } : word; + }) + ); + if (i < paragraphs.length - 1) { + myself.words.push('\n'); + } + } + } + }); + + this.words.forEach(function (word, i) { + if (word === '\n') { + myself.lines.push(line); + myself.maxLineWidth = Math.max(myself.maxLineWidth, lineWidth); + line = []; + lineWidth = 0; + } else { + if (prependSpace) { + if (word.font === myself.words[i-1].font) { + context.font = myself.font(word.font); + } else { + context.font = myself.font(); + } + w = context.measureText(' ').width; + } else { + w = 0; + } + context.font = myself.font(word.font); + w += myself.calculateWordWidth(word); + if (myself.maxWidth > 0 && lineWidth + w > myself.maxWidth) { + myself.lines.push(line); + myself.maxLineWidth = Math.max( + myself.maxLineWidth, + lineWidth + ); + line = [word]; + lineWidth = w; + } else { + if (prependSpace) { + if (word instanceof Morph) { + line.push(' '); + line.push(word); + } else if (typeof word === 'string') { + line.push(' ' + word); + } else if (word.font === myself.words[i-1].font) { + word.text = ' ' + word.text; + line.push(word); + } else { + line.push(' '); + line.push(word); + } + } else { + line.push(word); + } + lineWidth += w; + } + nextWord = myself.words[i+1]; + if ( + word === '(' || nextWord == null || ( + typeof nextWord === 'string' && ( + contains(['.', ',', '!', '\n'], myself.words[i+1]) + || myself.words[i+1].startsWith(')') + ) + ) + ) { + prependSpace = false; + } else { + prependSpace = true; + } + } + }); + this.lines.push(line); + this.maxLineWidth = Math.max(this.maxLineWidth, lineWidth); +}; + +RichTextMorph.prototype.font = function (fontName) { + // answer a font string, e.g. 'bold italic 12px sans-serif' + fontName = fontName || this.fontName; + var font = ''; + if (this.isBold) { + font = font + 'bold '; + } + if (this.isItalic) { + font = font + 'italic '; + } + return font + + this.fontSize + 'px ' + + (fontName ? fontName + ', ' : '') + + this.fontStyle; +}; + +RichTextMorph.prototype.drawNew = function () { + var myself = this, context, height, width, i, j, line, lineHeight, word, + shadowHeight, shadowWidth, offx, offy, x, y, + defaultColor = this.color.toString(); + + this.image = newCanvas(); + context = this.image.getContext('2d'); + this.parse(); + + // set my extent + shadowWidth = Math.abs(this.shadowOffset.x); + shadowHeight = Math.abs(this.shadowOffset.y); + height = 0; + this.lines.forEach(function (line) { + height += myself.calculateLineHeight(line) + shadowHeight; + }); + if (this.maxWidth === 0) { + this.bounds = this.bounds.origin.extent( + new Point(this.maxLineWidth + shadowWidth, height) + ); + } else { + this.bounds = this.bounds.origin.extent( + new Point(this.maxWidth + shadowWidth, height) + ); + } + this.image.width = this.width(); + this.image.height = this.height(); + + // prepare context for drawing text + context = this.image.getContext('2d'); + context.font = this.font(); + context.textAlign = 'left'; + context.textBaseline = 'bottom'; + + // fill the background, if desired + if (this.backgroundColor) { + context.fillStyle = this.backgroundColor.toString(); + context.fillRect(0, 0, this.width(), this.height()); + } + + // don't bother with drawing shadow + + // now draw the actual text + offx = Math.abs(Math.min(this.shadowOffset.x, 0)); + offy = Math.abs(Math.min(this.shadowOffset.y, 0)); + + y = 0; + for (i = 0; i < this.lines.length; i++) { + line = this.lines[i]; + width = this.calculateLineWidth(line) + shadowWidth; + if (this.alignment === 'right') { + x = this.width() - width; + } else if (this.alignment === 'center') { + x = (this.width() - width) / 2; + } else { // 'left' + x = 0; + } + lineHeight = this.calculateLineHeight(line); + y += lineHeight / 2; + for (j = 0; j < line.length; j = j + 1) { + word = line[j]; + if (word instanceof Morph) { + word.setPosition(this.position().add(new Point( + x + offx, + y - (this.calculateWordHeight(word) / 2) + offy + ))); + } else { + context.font = this.font(word.font); + context.fillStyle = word.color || defaultColor; + context.fillText( + word.text || word, x + offx, + y + (this.calculateWordHeight(word) / 2) + + offy + ); + } + x += this.calculateWordWidth(word); + } + y += lineHeight / 2 + shadowHeight; + } + + // notify my parent of layout change + if (this.parent) { + if (this.parent.layoutChanged) { + this.parent.layoutChanged(); + } + } +}; + +RichTextMorph.prototype.calculateWordWidth = function (word) { + var canvas = newCanvas(), + context = canvas.getContext('2d'); + context.font = this.font(word.font); + if (word instanceof Morph) { + return word.width(); + } + return context.measureText(word.text || word).width; +}; + +RichTextMorph.prototype.calculateLineWidth = function (line) { + var myself = this, width = 0; + line.forEach(function (word) { + width += myself.calculateWordWidth(word); + }); + return width; +}; + +RichTextMorph.prototype.calculateWordHeight = function (word) { + if (word instanceof BlockMorph) { + return word.stackFullBounds().height(); + } else if (word instanceof Morph) { + return word.height(); + } + return fontHeight(this.fontSize); +}; + +RichTextMorph.prototype.calculateLineHeight = function (line) { + var myself = this, height = 0; + line.forEach(function (word) { + height = Math.max(height, myself.calculateWordHeight(word)); + }); + return height; +}; + +// ScriptDiagramMorph /////////////////////////////////////////////////// + +// ScriptDiagramMorph inherits from FrameMorph: + +ScriptDiagramMorph.prototype = new FrameMorph(); +ScriptDiagramMorph.prototype.constructor = ScriptDiagramMorph; +ScriptDiagramMorph.uber = FrameMorph.prototype; + +// ScriptDiagramMorph layout settings: + +ScriptDiagramMorph.prototype.margin = 30; +ScriptDiagramMorph.prototype.padding = 5; + +// ScriptDiagramMorph instance creation: + +function ScriptDiagramMorph( + script, + annotation, + menus, + bubbles, + defaultArrowColor +) { + this.init( + script, + annotation, + menus, + bubbles, + defaultArrowColor + ); +} + +ScriptDiagramMorph.prototype.init = function ( + script, + annotations, + menus, + bubbles, + defaultArrowColor +) { + var myself = this, scriptWidth, scriptHeight, displayWidth, + displayHeight; + + // additional properties: + this.script = script; + this.scriptContainer = new Morph(); + this.scriptContainer.drawNew = function () { + this.image = newCanvas(new Point(1, 1)); + }; + this.scriptScale = 1; + this.annotations = annotations || []; + this.menus = menus || []; + this.bubbles = bubbles || []; + this.defaultArrowColor = defaultArrowColor; + this.arrows = []; + this.widthNoBubble = 0; + this.widthNoAnnotations = 0; + this.heightNoAnnotations = 0; + + // initialize inherited properties: + ScriptDiagramMorph.uber.init.call(this); + + if (this.script instanceof BlockMorph) { + scriptWidth = this.script.stackFullBounds().width(); + scriptHeight = this.script.stackFullBounds().height(); + } else { + scriptWidth = this.script.width(); + scriptHeight = this.script.height(); + } + this.scriptScale = this.script.scriptScale || 1; + displayWidth = scriptWidth; + displayHeight = scriptHeight; + this.widthNoBubble = displayWidth; + + this.script.forAllChildren(function (child) { + if (child.annotationHighlight) { + child.addDiagramHighlight(); + } + }); + this.script.forAllChildren(function (child) { + if (child.annotationGhost) { + child.ghost(); + } + }); + this.scriptContainer.add(this.script); + + this.bubbles.forEach(function (bubbleValue, i) { + var annotated, bubble; + annotated = myself.getAnnotatedMorph('annotationBubble', i + 1); + if (annotated) { + if (bubbleValue instanceof ImageMorph) { + // diagram will need to be redrawn on image load + bubbleValue.diagram = myself; + } + bubble = annotated.showBubble( + bubbleValue, false, new SpriteMorph(), true + ); + bubble.addShadow(new Point(2, 2), 80); + myself.scriptContainer.add(bubble); + bubble.fullChanged(); + bubble.setTop(2); + bubble.setLeft(myself.script.right() + 2); + if (annotations.length === 0) { + myself.script.setTop( + Math.max( + myself.script.top(), + bubble.bottom() - scriptHeight / 2 + ) + ); + } else { + // bubble is higher to make room for annotations + myself.script.setTop( + Math.max(myself.script.top(), bubble.bottom()) + ); + } + displayWidth = Math.max( + displayWidth, bubble.fullBounds().right() + ); + displayHeight = Math.max( + displayHeight, myself.script.bottom() + ); + } + }); + + this.menus.forEach(function (menu, i) { + var annotated; + annotated = myself.getAnnotatedMorph('annotationMenu', i + 1); + if (annotated) { + myself.scriptContainer.add(menu); + menu.setPosition(annotated.rightCenter().add(new Point(-10, 5))); + myself.widthNoBubble = Math.max( + myself.widthNoBubble, + menu.fullBounds().right() - myself.left() + ); + displayWidth = Math.max( + displayWidth, + menu.fullBounds().right() - myself.left() + ); + displayHeight = Math.max( + displayHeight, + menu.fullBounds().bottom() - myself.top() + ); + } + }); + + this.scriptContainer.setExtent(new Point(displayWidth, displayHeight)); + displayWidth *= this.scriptScale; + displayHeight *= this.scriptScale; + this.widthNoBubble *= this.scriptScale; + // default extent doesn't include annotations + this.widthNoAnnotations = displayWidth; + this.heightNoAnnotations = displayHeight; + this.setExtent(new Point(displayWidth, displayHeight)); + + this.drawNew(); +}; + +ScriptDiagramMorph.prototype.drawNew = function () { + var img, scaledImg, ctx; + img = this.scriptContainer.fullImage(); + scaledImg = newCanvas(this.extent()); + ctx = scaledImg.getContext('2d'); + ctx.drawImage( + img, 0, 0, this.widthNoAnnotations, this.heightNoAnnotations + ); + this.image = scaledImg; +}; + +ScriptDiagramMorph.prototype.fixLayout = function () { + var annotationsHeight; + this.arrows.forEach(function (arrow) { + arrow.destroy(); + }); + this.arrows = []; + annotationsHeight = this.addAnnotations(); + this.setHeight(Math.max(annotationsHeight, this.heightNoAnnotations)); +}; + +ScriptDiagramMorph.prototype.addAnnotations = function () { + var myself = this, minTop, annotationsHeight, horizontalArrows, i, + lastCreated, annotation, arrow, arrowStart, arrowEnd, + arrowStartMorph, arrowEndMorph, allArrows; + + minTop = this.top() + this.script.top() * this.scriptScale; + annotationsHeight = 0; + horizontalArrows = []; + this.annotations.forEach(function (annotation, i) { + if (annotation.annotationArrowHorizontal) { + horizontalArrows.push(i); + } + }); + lastCreated = -1; + + horizontalArrows.forEach(function (arrowIdx) { + var localMinTop = minTop, localMaxBottom = -1; + for (i = arrowIdx; i > lastCreated; i--) { + annotation = myself.addAnnotation( + i + 1, localMinTop, localMaxBottom + ); + if (annotation) { + minTop = Math.max(minTop, annotation.bottom()); + localMaxBottom = annotation.top(); + annotationsHeight = Math.max( + annotationsHeight, annotation.bottom() - myself.top() + ); + } + } + lastCreated = arrowIdx; + }); + for (i = lastCreated + 1; i < this.annotations.length; i++) { + annotation = this.addAnnotation(i + 1, minTop, -1); + if (annotation) { + minTop = annotation.bottom(); + annotationsHeight = Math.max( + annotationsHeight, annotation.bottom() - this.top() + ); + } + } + + i = 1; + while (true) { + arrowStartMorph = this.getAnnotatedMorph('annotationArrowStart', i); + if (!arrowStartMorph) { + break; + } + arrowStart = this.position().add( + arrowStartMorph.center().multiplyBy(this.scriptScale) + ); + arrowEndMorph = this.getAnnotatedMorph('annotationArrowEnd', i); + arrowEnd = this.position().add( + arrowEndMorph.center().multiplyBy(this.scriptScale) + ); + allArrows = arrowEndMorph.annotationArrowEnd + .split(',') + .map(function (n) { + return +n; + }); + if (allArrows.length > 1) { + arrowEnd = arrowEnd.add(new Point( + this.padding * (-allArrows.length + 1) / 2 + + this.padding * allArrows.indexOf(i), + 0 + )); + } + arrow = new DiagramArrowMorph( + arrowStart, arrowEnd, true, + arrowStartMorph.annotationArrowReverse, + arrowStartMorph.annotationArrowDetour || 0 + ); + arrow.color = arrowStartMorph.annotationArrowColor + || this.defaultArrowColor; + arrow.drawNew(); + annotationsHeight = Math.max( + annotationsHeight, arrow.bottom() - this.top() + ); + this.arrows.push(arrow); + this.add(arrow); + i += 1; + } + + return annotationsHeight; +}; + +ScriptDiagramMorph.prototype.addAnnotation = function ( + id, minTop, maxBottom +) { + var annotation, annotated, annotationX, annotationWidth, + arrow, arrowStart, arrowEnd, lineHeight; + + annotationX = this.left() + this.widthNoBubble + this.margin; + annotationWidth = this.right() - annotationX; + + annotation = this.annotations[id - 1]; + annotated = this.getAnnotatedMorph('annotationID', id); + if (!annotated) { + return null; + } + + this.add(annotation); + if (annotation.annotationArrowDetour) { + arrowEnd = this.position().add( + annotated.center().multiplyBy(this.scriptScale) + ); + } else if ( + annotated instanceof CommandBlockMorph + || annotated instanceof MenuItemMorph + || annotated === annotated.topBlock() + ) { + arrowEnd = this.position().add(new Point( + annotated.right() + this.padding, + annotated.parts + ? annotated.parts()[0].center().y + : annotated.center().y + ).multiplyBy(this.scriptScale)); + } else if (id === 1) { + arrowEnd = this.position().add(new Point( + annotated.right(), + annotated.center().y + ).multiplyBy(this.scriptScale)); + } else { + arrowEnd = this.position().add( + annotated.bottomCenter().multiplyBy(this.scriptScale) + ); + } + + if (annotation instanceof TextMorph) { + annotation.setWidth(annotationWidth); + } + + if (annotation instanceof RichTextMorph) { + lineHeight = annotation.calculateLineHeight(annotation.lines[0]); + } else if (annotation instanceof TextMorph) { + lineHeight = fontHeight(annotation.fontSize); + } else { + lineHeight = annotation.height(); + } + + annotation.setPosition(new Point( + annotationX, + arrowEnd.y - lineHeight / 2 + )); + if (!annotation.annotationArrowHorizontal) { + if (annotation.top() < minTop && minTop - annotation.top() > 3) { + // Don't bother enforcing minTop if the change would be + // miniscule. This will keep the annotation's arrow straight, + // which looks better. + annotation.setTop(minTop); + } + if (maxBottom > -1) { + annotation.setBottom(Math.min(maxBottom, annotation.bottom())); + } + } + + arrowStart = new Point( + annotation.left() - this.padding, + annotation.top() + lineHeight / 2 + ); + + arrow = new DiagramArrowMorph( + arrowStart, arrowEnd, false, + annotation.annotationArrowReverse, + annotation.annotationArrowDetour || 0 + ); + arrow.color = annotation.annotationArrowColor || this.defaultArrowColor; + arrow.drawNew(); + this.arrows.push(arrow); + this.add(arrow); + + return annotation; +}; + +ScriptDiagramMorph.prototype.getAnnotatedMorph = function (attribute, id) { + function check (morph) { + var i, result, ids, attrValue = morph[attribute]; + if (attrValue) { + ids = attrValue.split(',').map(function (n) { + return +n; + }); + if (contains(ids, id)) { + return morph; + } + } + for (i = 0; i < morph.children.length; i++) { + result = check(morph.children[i]); + if (result) { + return result; + } + } + return null; + } + return check(this.scriptContainer); +}; + +// DiagramArrowMorph //////////////////////////////////////////////////// + +// DiagramArrowMorph inherits from FrameMorph: + +DiagramArrowMorph.prototype = new Morph(); +DiagramArrowMorph.prototype.constructor = DiagramArrowMorph; +DiagramArrowMorph.uber = Morph.prototype; + +function DiagramArrowMorph(start, end, scriptToScript, reverse, detourSize) { + this.init(start, end, scriptToScript, reverse, detourSize); +} + +DiagramArrowMorph.prototype.init = function ( + start, + end, + scriptToScript, + reverse, + detourSize +) { + // additional properties: + this.start = start; + this.end = end; + // scriptToScript means the arrow is contained entirely within the + // annotated script (no outside annotation) + this.scriptToScript = scriptToScript; + this.reverse = reverse; + this.detourSize = detourSize; + this.padding = 5 + detourSize; + + // initialize inherited properties: + DiagramArrowMorph.uber.init.call(this); +}; + +DiagramArrowMorph.prototype.drawNew = function () { + var start, end, oldStart, ctx, theta, r, detourSize, x, y; + + r = 5; // arrow head size + detourSize = this.detourSize; + + this.silentSetExtent( + this.end.subtract(this.start).abs().add(this.padding * 2) + ); + this.setPosition(this.start.min(this.end).subtract(this.padding)); + + start = new Point( + this.start.x < this.end.x + ? this.padding + : this.width() - this.padding, + this.start.y < this.end.y + ? this.padding + : this.height() - this.padding + ); + end = new Point( + this.start.x < this.end.x + ? this.width() - this.padding + : this.padding, + this.start.y < this.end.y + ? this.height() - this.padding + : this.padding + ); + if (this.reverse) { + oldStart = start; + start = end; + end = oldStart; + } + + this.image = newCanvas(this.extent()); + ctx = this.image.getContext('2d'); + ctx.strokeStyle = ctx.fillStyle = this.color.toString(); + + theta = end.subtract(start).theta(); + ctx.beginPath(); + ctx.lineWidth = 3; + ctx.moveTo(x = start.x, y = start.y); + if (detourSize > 0) { + if (!this.scriptToScript) { + ctx.lineTo( + x = x + detourSize * Math.cos(theta), + y = y + detourSize * Math.sin(theta) + ); + } + theta -= Math.PI / 2; + ctx.lineTo( + x = x + detourSize * Math.cos(theta), + y = y + detourSize * Math.sin(theta) + ); + theta += Math.PI; + ctx.lineTo( + x = end.x - detourSize * Math.cos(theta), + y = end.y - detourSize * Math.sin(theta) + ); + } + end = end.subtract(new Point ( + r * Math.cos(theta), r * Math.sin(theta) + )); + ctx.lineTo(x = end.x, y = end.y); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo( + x = end.x + r * Math.cos(theta), + y = end.y + r * Math.sin(theta) + ); + theta += 2/3 * Math.PI; + ctx.lineTo( + x = end.x + r * Math.cos(theta), + y = end.y + r * Math.sin(theta) + ); + theta += 2/3 * Math.PI; + ctx.lineTo( + x = end.x + r * Math.cos(theta), + y = end.y + r * Math.sin(theta) + ); + ctx.closePath(); + ctx.fill(); +}; + +// BlockMorph /////////////////////////////////////////////////////////// + +BlockMorph.prototype.addDiagramHighlight = function (oldHighlight) { + var isHidden = !this.isVisible, + oldUseBlurredShadows = useBlurredShadows, + highlight; + + if (isHidden) {this.show(); } + useBlurredShadows = false; + highlight = this.highlight( + oldHighlight ? oldHighlight.color : new Color(0, 255, 0), + 10, + 2 + ); + useBlurredShadows = oldUseBlurredShadows; + this.addBack(highlight); + this.fullChanged(); + if (isHidden) {this.hide(); } + return highlight; +}; + +// ArgMorph ///////////////////////////////////////////////////////////// + +ArgMorph.prototype.addDiagramHighlight = BlockMorph.prototype.addDiagramHighlight; +ArgMorph.prototype.removeHighlight = BlockMorph.prototype.removeHighlight; +ArgMorph.prototype.toggleHighlight = ArgMorph.prototype.toggleHighlight; +ArgMorph.prototype.highlight = BlockMorph.prototype.highlight; +ArgMorph.prototype.highlightImage = BlockMorph.prototype.highlightImage; +ArgMorph.prototype.highlightImageBlurred = + BlockMorph.prototype.highlightImageBlurred; +ArgMorph.prototype.getHighlight = BlockMorph.prototype.getHighlight; diff --git a/libraries/help_translator.xml b/libraries/help_translator.xml new file mode 100644 index 0000000000..35b8569d32 --- /dev/null +++ b/libraries/help_translator.xml @@ -0,0 +1 @@ +
0
isDonevar done = false, error = null, ide = world.children[0], zip = new JSZip(); function handleHelpScreens (list) { var spec = list.shift(); if (spec) { ide.getURL( ide.resourceURL('help', SnapTranslator.language, spec + '.xml?t=' + Date.now()), function (xmlString) { if (xmlString) { new SnapSerializer().loadHelpScreen( xmlString, function (err, screen) { if (err) { error = err; } else { zip.file( spec + '.png', screen.fullImageClassic().toDataURL().split(',')[1], { base64: true } ); handleHelpScreens(list); } } ); } else { error = new Error('could not retrieve help screen ' + spec); } } ); } else { zip.generateAsync({type: 'blob'}) .then(function (blob) { saveAs(blob, SnapTranslator.language + '.zip'); done = true; }); } } function isDone () { if (error) { throw error; } return done; } ide.getURL( ide.resourceURL('help', SnapTranslator.language, 'HELP?t=' + Date.now()), function (str) { if (str) { handleHelpScreens(str.trim().split('\n')); } else { error = new Error('could not retrieve help screens list'); } } ); return isDone;
\ No newline at end of file diff --git a/libraries/jszip.min.js b/libraries/jszip.min.js new file mode 100755 index 0000000000..7e2110bc53 --- /dev/null +++ b/libraries/jszip.min.js @@ -0,0 +1,15 @@ +/*! + +JSZip v3.2.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/master/LICENSE +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,h=(3&b)<<4|c>>4,i=n>1?(15&c)<<2|e>>6:64,j=n>2?63&e:64,k.push(f.charAt(g)+f.charAt(h)+f.charAt(i)+f.charAt(j));return k.join("")},c.decode=function(a){var b,c,d,g,h,i,j,k=0,l=0,m="data:";if(a.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");var n=3*a.length/4;if(a.charAt(a.length-1)===f.charAt(64)&&n--,a.charAt(a.length-2)===f.charAt(64)&&n--,n%1!==0)throw new Error("Invalid base64 input, bad content length.");var o;for(o=e.uint8array?new Uint8Array(0|n):new Array(0|n);k>4,c=(15&h)<<4|i>>2,d=(3&i)<<6|j,o[l++]=b,64!==i&&(o[l++]=c),64!==j&&(o[l++]=d);return o}},{"./support":30,"./utils":32}],2:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.compressedSize=a,this.uncompressedSize=b,this.crc32=c,this.compression=d,this.compressedContent=e}var e=a("./external"),f=a("./stream/DataWorker"),g=a("./stream/DataLengthProbe"),h=a("./stream/Crc32Probe"),g=a("./stream/DataLengthProbe");d.prototype={getContentWorker:function(){var a=new f(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),b=this;return a.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),a},getCompressedWorker:function(){return new f(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(a,b,c){return a.pipe(new h).pipe(new g("uncompressedSize")).pipe(b.compressWorker(c)).pipe(new g("compressedSize")).withStreamInfo("compression",b)},b.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,b,c){"use strict";var d=a("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(a){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},c.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g>>8^e[255&(a^b[g])];return a^-1}function f(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g>>8^e[255&(a^b.charCodeAt(g))];return a^-1}var g=a("./utils"),h=d();b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==g.getTypeOf(a);return c?e(0|b,a,a.length,0):f(0|b,a,a.length,0)}},{"./utils":32}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(a,b,c){"use strict";var d=null;d="undefined"!=typeof Promise?Promise:a("lie"),b.exports={Promise:d}},{lie:37}],7:[function(a,b,c){"use strict";function d(a,b){h.call(this,"FlateWorker/"+a),this._pako=null,this._pakoAction=a,this._pakoOptions=b,this.meta={}}var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,f=a("pako"),g=a("./utils"),h=a("./stream/GenericWorker"),i=e?"uint8array":"array";c.magic="\b\0",g.inherits(d,h),d.prototype.processChunk=function(a){this.meta=a.meta,null===this._pako&&this._createPako(),this._pako.push(g.transformTo(i,a.data),!1)},d.prototype.flush=function(){h.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var a=this;this._pako.onData=function(b){a.push({data:b,meta:a.meta})}},c.compressWorker=function(a){return new d("Deflate",a)},c.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,b,c){"use strict";function d(a,b,c,d){f.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=c,this.encodeFileName=d,this.streamFiles=a,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var e=a("../utils"),f=a("../stream/GenericWorker"),g=a("../utf8"),h=a("../crc32"),i=a("../signature"),j=function(a,b){var c,d="";for(c=0;c>>=8;return d},k=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},l=function(a,b){return 63&(a||0)},m=function(a,b,c,d,f,m){var n,o,p=a.file,q=a.compression,r=m!==g.utf8encode,s=e.transformTo("string",m(p.name)),t=e.transformTo("string",g.utf8encode(p.name)),u=p.comment,v=e.transformTo("string",m(u)),w=e.transformTo("string",g.utf8encode(u)),x=t.length!==p.name.length,y=w.length!==u.length,z="",A="",B="",C=p.dir,D=p.date,E={crc32:0,compressedSize:0,uncompressedSize:0};b&&!c||(E.crc32=a.crc32,E.compressedSize=a.compressedSize,E.uncompressedSize=a.uncompressedSize);var F=0;b&&(F|=8),r||!x&&!y||(F|=2048);var G=0,H=0;C&&(G|=16),"UNIX"===f?(H=798,G|=k(p.unixPermissions,C)):(H=20,G|=l(p.dosPermissions,C)),n=D.getUTCHours(),n<<=6,n|=D.getUTCMinutes(),n<<=5,n|=D.getUTCSeconds()/2,o=D.getUTCFullYear()-1980,o<<=4,o|=D.getUTCMonth()+1,o<<=5,o|=D.getUTCDate(),x&&(A=j(1,1)+j(h(s),4)+t,z+="up"+j(A.length,2)+A),y&&(B=j(1,1)+j(h(v),4)+w,z+="uc"+j(B.length,2)+B);var I="";I+="\n\0",I+=j(F,2),I+=q.magic,I+=j(n,2),I+=j(o,2),I+=j(E.crc32,4),I+=j(E.compressedSize,4),I+=j(E.uncompressedSize,4),I+=j(s.length,2),I+=j(z.length,2);var J=i.LOCAL_FILE_HEADER+I+s+z,K=i.CENTRAL_FILE_HEADER+j(H,2)+I+j(v.length,2)+"\0\0\0\0"+j(G,4)+j(d,4)+s+z+v;return{fileRecord:J,dirRecord:K}},n=function(a,b,c,d,f){var g="",h=e.transformTo("string",f(d));return g=i.CENTRAL_DIRECTORY_END+"\0\0\0\0"+j(a,2)+j(a,2)+j(b,4)+j(c,4)+j(h.length,2)+h},o=function(a){var b="";return b=i.DATA_DESCRIPTOR+j(a.crc32,4)+j(a.compressedSize,4)+j(a.uncompressedSize,4)};e.inherits(d,f),d.prototype.push=function(a){var b=a.meta.percent||0,c=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(a):(this.bytesWritten+=a.data.length,f.prototype.push.call(this,{data:a.data,meta:{currentFile:this.currentFile,percent:c?(b+100*(c-d-1))/c:100}}))},d.prototype.openedSource=function(a){this.currentSourceOffset=this.bytesWritten,this.currentFile=a.file.name;var b=this.streamFiles&&!a.file.dir;if(b){var c=m(a,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(a){this.accumulate=!1;var b=this.streamFiles&&!a.file.dir,c=m(a,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),b)this.push({data:o(a),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var a=this.bytesWritten,b=0;b0?a.substring(0,b):""},q=function(a){return"/"!==a.slice(-1)&&(a+="/"),a},r=function(a,b){return b="undefined"!=typeof b?b:i.createFolders,a=q(a),this.files[a]||o.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},s={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(a){var b,c,d;for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],c=b.slice(this.root.length,b.length),c&&b.slice(0,this.root.length)===this.root&&a(c,d))},filter:function(a){var b=[];return this.forEach(function(c,d){a(c,d)&&b.push(d)}),b},file:function(a,b,c){if(1===arguments.length){if(d(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}var f=this.files[this.root+a];return f&&!f.dir?f:null}return a=this.root+a,o.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=r.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!==a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f-this.zero;return-1},d.prototype.readAndCheckSignature=function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.readData(4);return b===f[0]&&c===f[1]&&d===f[2]&&e===f[3]},d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],18:[function(a,b,c){"use strict";function d(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}var e=a("../utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readAndCheckSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},b.exports=d},{"../utils":32}],19:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./Uint8ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},d.prototype.readAndCheckSignature=function(a){var b=this.readData(4);return a===b},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],21:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(a,b,c){"use strict";var d=a("../utils"),e=a("../support"),f=a("./ArrayReader"),g=a("./StringReader"),h=a("./NodeBufferReader"),i=a("./Uint8ArrayReader");b.exports=function(a){var b=d.getTypeOf(a);return d.checkSupport(b),"string"!==b||e.uint8array?"nodebuffer"===b?new h(a):e.uint8array?new i(d.transformTo("uint8array",a)):new f(d.transformTo("array",a)):new g(a)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],24:[function(a,b,c){"use strict";function d(a){e.call(this,"ConvertWorker to "+a),this.destType=a}var e=a("./GenericWorker"),f=a("../utils");f.inherits(d,e),d.prototype.processChunk=function(a){this.push({data:f.transformTo(this.destType,a.data),meta:a.meta})},b.exports=d},{"../utils":32,"./GenericWorker":28}],25:[function(a,b,c){"use strict";function d(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var e=a("./GenericWorker"),f=a("../crc32"),g=a("../utils");g.inherits(d,e),d.prototype.processChunk=function(a){this.streamInfo.crc32=f(a.data,this.streamInfo.crc32||0),this.push(a)},b.exports=d},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,b,c){"use strict";function d(a){f.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}var e=a("../utils"),f=a("./GenericWorker");e.inherits(d,f),d.prototype.processChunk=function(a){if(a){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+a.data.length}f.prototype.processChunk.call(this,a)},b.exports=d},{"../utils":32,"./GenericWorker":28}],27:[function(a,b,c){"use strict";function d(a){f.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(a){b.dataIsReady=!0,b.data=a,b.max=a&&a.length||0,b.type=e.getTypeOf(a),b.isPaused||b._tickAndRepeat()},function(a){b.error(a)})}var e=a("../utils"),f=a("./GenericWorker"),g=16384;e.inherits(d,f),d.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},d.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=g,b=null,c=Math.min(this.max,this.index+a);if(this.index>=this.max)return this.end();switch(this.type){case"string":b=this.data.substring(this.index,c);break;case"uint8array":b=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":b=this.data.slice(this.index,c)}return this.index=c,this.push({data:b,meta:{percent:this.max?this.index/this.max*100:0}})},b.exports=d},{"../utils":32,"./GenericWorker":28}],28:[function(a,b,c){"use strict";function d(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,b){return this._listeners[a].push(b),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,b){if(this._listeners[a])for(var c=0;c "+a:a}},b.exports=d},{}],29:[function(a,b,c){"use strict";function d(a,b,c){switch(a){case"blob":return h.newBlob(h.transformTo("arraybuffer",b),c);case"base64":return k.encode(b);default:return h.transformTo(a,b)}}function e(a,b){var c,d=0,e=null,f=0;for(c=0;c=252?6:k>=248?5:k>=240?4:k>=224?3:k>=192?2:1;j[254]=j[254]=1;var l=function(a){var b,c,d,e,f,h=a.length,i=0;for(e=0;e>>6,b[f++]=128|63&c):c<65536?(b[f++]=224|c>>>12,b[f++]=128|c>>>6&63,b[f++]=128|63&c):(b[f++]=240|c>>>18,b[f++]=128|c>>>12&63,b[f++]=128|c>>>6&63,b[f++]=128|63&c);return b},m=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+j[a[c]]>b?c:b},n=function(a){var b,c,d,e,g=a.length,h=new Array(2*g);for(c=0,b=0;b4)h[c++]=65533,b+=e-1;else{for(d&=2===e?31:3===e?15:7;e>1&&b1?h[c++]=65533:d<65536?h[c++]=d:(d-=65536,h[c++]=55296|d>>10&1023,h[c++]=56320|1023&d)}return h.length!==c&&(h.subarray?h=h.subarray(0,c):h.length=c),f.applyFromCharCode(h)};c.utf8encode=function(a){return g.nodebuffer?h.newBufferFrom(a,"utf-8"):l(a)},c.utf8decode=function(a){return g.nodebuffer?f.transformTo("nodebuffer",a).toString("utf-8"):(a=f.transformTo(g.uint8array?"uint8array":"array",a),n(a))},f.inherits(d,i),d.prototype.processChunk=function(a){var b=f.transformTo(g.uint8array?"uint8array":"array",a.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var d=b;b=new Uint8Array(d.length+this.leftOver.length),b.set(this.leftOver,0),b.set(d,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var e=m(b),h=b;e!==b.length&&(g.uint8array?(h=b.subarray(0,e),this.leftOver=b.subarray(e,b.length)):(h=b.slice(0,e),this.leftOver=b.slice(e,b.length))),this.push({data:c.utf8decode(h),meta:a.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=d,f.inherits(e,i),e.prototype.processChunk=function(a){this.push({data:c.utf8encode(a.data),meta:a.meta})},c.Utf8EncodeWorker=e},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,b,c){"use strict";function d(a){var b=null;return b=i.uint8array?new Uint8Array(a.length):new Array(a.length),f(a,b)}function e(a){return a}function f(a,b){for(var c=0;c1;)try{return n.stringifyByChunk(a,d,b)}catch(f){b=Math.floor(b/2)}return n.stringifyByChar(a)}function h(a,b){for(var c=0;c1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)this.isSignature(c,g.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(a){this.reader=e(a)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(a,b,c){"use strict";function d(a,b){this.options=a,this.loadOptions=b}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./compressedObject"),h=a("./crc32"),i=a("./utf8"),j=a("./compressions"),k=a("./support"),l=0,m=3,n=function(a){for(var b in j)if(j.hasOwnProperty(b)&&j[b].magic===a)return j[b];return null};d.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(c),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(b=n(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,b,a.readData(this.compressedSize))},readCentralPart:function(a){this.versionMadeBy=a.readInt(2),a.skip(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4);var b=a.readInt(2);if(this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");a.skip(b),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),a===l&&(this.dosPermissions=63&this.externalFileAttributes),a===m&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(a){if(this.extraFields[1]){var b=e(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});a.index0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);if(b.header&&h.deflateSetHeader(this.strm,b.header),b.dictionary){var e;if(e="string"==typeof b.dictionary?j.string2buf(b.dictionary):"[object ArrayBuffer]"===m.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=h.deflateSetDictionary(this.strm,e),c!==p)throw new Error(k[c]);this._dict_set=!0}}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg||k[c.err];return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d!==r||(this.onEnd(p),e.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg||k[c.err];return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l,m=this.strm,o=this.options.chunkSize,p=this.options.dictionary,q=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?m.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?m.input=new Uint8Array(a):m.input=a,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new h.Buf8(o),m.next_out=0,m.avail_out=o),c=g.inflate(m,j.Z_NO_FLUSH),c===j.Z_NEED_DICT&&p&&(l="string"==typeof p?i.string2buf(p):"[object ArrayBuffer]"===n.call(p)?new Uint8Array(p):p,c=g.inflateSetDictionary(this.strm,l)),c===j.Z_BUF_ERROR&&q===!0&&(c=j.Z_OK,q=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&c!==j.Z_STREAM_END&&(0!==m.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(m.output,m.next_out),f=m.next_out-e,k=i.buf2string(m.output,e),m.next_out=f,m.avail_out=o-f,f&&h.arraySet(m.output,m.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(q=!0)}while((m.avail_in>0||0===m.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d!==j.Z_SYNC_FLUSH||(this.onEnd(j.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;f=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;f>>6,b[g++]=128|63&c):c<65536?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;c4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&c1?j[e++]=65533:f<65536?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":41}],43:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],44:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;h>>8^e[255&(a^b[h])];return a^-1}var f=d();b.exports=e},{}],46:[function(a,b,c){"use strict";function d(a,b){return a.msg=I[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(E.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){F._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,E.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=G(a.adler,b,e,c):2===a.state.wrap&&(a.adler=H(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-la?a.strstart-(a.w_size-la):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ka,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&fg){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-la)){E.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ja)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===J)return ua;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ua;if(a.strstart-a.block_start>=a.w_size-la&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ua:ua}function o(a,b){for(var c,d;;){if(a.lookahead=ja&&(a.ins_h=(a.ins_h<=ja)if(d=F._tr_tally(a,a.strstart-a.match_start,a.match_length-ja),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ja){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=ja&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=ja-1)),a.prev_length>=ja&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ja,d=F._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ja),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=ja&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ka;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&ea.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ja?(c=F._tr_tally(a,1,a.match_length-ja),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===J)return ua;break}if(a.match_length=0,c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=D[a.level].max_lazy,a.good_match=D[a.level].good_length,a.nice_match=D[a.level].nice_length,a.max_chain_length=D[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ja-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*ha),this.dyn_dtree=new E.Buf16(2*(2*fa+1)),this.bl_tree=new E.Buf16(2*(2*ga+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(ia+1),this.heap=new E.Buf16(2*ea+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ea+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Z,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?na:sa,a.adler=2===b.wrap?0:1,b.last_flush=J,F._tr_init(b),O):d(a,Q)}function w(a){var b=v(a);return b===O&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?Q:(a.state.gzhead=b,O):Q}function y(a,b,c,e,f,g){if(!a)return Q;var h=1;if(b===T&&(b=6),e<0?(h=0,e=-e):e>15&&(h=2,e-=16),f<1||f>_||c!==$||e<8||e>15||b<0||b>9||g<0||g>X)return d(a,Q);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<N||b<0)return a?d(a,Q):Q;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ta&&b!==M)return d(a,0===a.avail_out?S:Q);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===na)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=H(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=oa):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,ya),h.status=sa);else{var m=$+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=V||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ma),m+=31-m%31,h.status=sa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===oa)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=qa)}else h.status=qa;if(h.status===qa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=ra)}else h.status=ra;if(h.status===ra&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=sa)):h.status=sa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,O}else if(0===a.avail_in&&e(b)<=e(c)&&b!==M)return d(a,S);if(h.status===ta&&0!==a.avail_in)return d(a,S);if(0!==a.avail_in||0!==h.lookahead||b!==J&&h.status!==ta){var o=h.strategy===V?r(h,b):h.strategy===W?q(h,b):D[h.level].func(h,b);if(o!==wa&&o!==xa||(h.status=ta),o===ua||o===wa)return 0===a.avail_out&&(h.last_flush=-1),O;if(o===va&&(b===K?F._tr_align(h):b!==N&&(F._tr_stored_block(h,0,0,!1),b===L&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,O}return b!==M?O:h.wrap<=0?P:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?O:P)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa&&b!==ta?d(a,Q):(a.state=null,b===sa?d(a,R):O)):Q}function C(a,b){var c,d,e,g,h,i,j,k,l=b.length;if(!a||!a.state)return Q;if(c=a.state,g=c.wrap,2===g||1===g&&c.status!==na||c.lookahead)return Q;for(1===g&&(a.adler=G(a.adler,b,l,0)),c.wrap=0,l>=c.w_size&&(0===g&&(f(c.head),c.strstart=0,c.block_start=0,c.insert=0),k=new E.Buf8(c.w_size),E.arraySet(k,b,l-c.w_size,c.w_size,0),b=k,l=c.w_size),h=a.avail_in,i=a.next_in,j=a.input,a.avail_in=l,a.next_in=0,a.input=b,m(c);c.lookahead>=ja;){d=c.strstart,e=c.lookahead-(ja-1);do c.ins_h=(c.ins_h<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<>>=w,q-=w),q<15&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,w2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(f>3,f-=x,q-=x<<3,p&=(1<>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=L,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new s.Buf32(pa),b.distcode=b.distdyn=new s.Buf32(qa),b.sane=1,b.back=-1,D):G}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):G}function h(a,b){var c,d;return a&&a.state?(d=a.state,b<0?(c=0,b=-b):(c=(b>>4)+1,b<48&&(b&=15)),b&&(b<8||b>15)?G:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):G}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==D&&(a.state=null),c):G}function j(a){return i(a,sa)}function k(a){if(ta){var b;for(q=new s.Buf32(512),r=new s.Buf32(32),b=0;b<144;)a.lens[b++]=8;for(;b<256;)a.lens[b++]=9;for(;b<280;)a.lens[b++]=7;for(;b<288;)a.lens[b++]=8;for(w(y,a.lens,0,288,q,0,a.work,{bits:9}),b=0;b<32;)a.lens[b++]=5;w(z,a.lens,0,32,r,0,a.work,{bits:5}),ta=!1}a.lencode=q,a.lenbits=9,a.distcode=r,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(s.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),s.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(s.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave>>8&255,c.check=u(c.check,Ba,2,0),m=0,n=0,c.mode=M;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=ma;break}if((15&m)!==K){a.msg="unknown compression method",c.mode=ma;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=ma;break}c.dmax=1<>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=N;case N:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=u(c.check,Ba,4,0)),m=0,n=0,c.mode=O;case O:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=P;case P:if(1024&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=Q;case Q:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),s.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=R;case R:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&q>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=W;break;case U:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ja;break}for(;n<3;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=Y;break;case 1:if(k(c),c.mode=ca,b===C){m>>>=2,n-=2;break a}break;case 2:c.mode=_;break;case 3:a.msg="invalid block type",c.mode=ma}m>>>=2,n-=2;break;case Y:for(m>>>=7&n,n-=7&n;n<32;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=ma;break}if(c.length=65535&m,m=0,n=0,c.mode=Z,b===C)break a;case Z:c.mode=$;case $:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;s.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=W;break;case _:for(;n<14;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=ma;break}c.have=0,c.mode=aa;case aa:for(;c.have>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=w(x,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=ma;break}c.have=0,c.mode=ba;case ba:for(;c.have>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;n>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=ma;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;n>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;n>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=ma;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===ma)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=ma;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=w(y,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=ma;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=w(z,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=ma;break}if(c.mode=ca,b===C)break a;case ca:c.mode=da;case da:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,v(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===W&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ia;break}if(32&ra){c.back=-1,c.mode=W;break}if(64&ra){a.msg="invalid literal/length code",c.mode=ma;break}c.extra=15&ra,c.mode=ea;case ea:if(c.extra){for(za=c.extra;n>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=fa;case fa:for(;Aa=c.distcode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=ma;break}c.offset=sa,c.extra=15&ra,c.mode=ga;case ga:if(c.extra){for(za=c.extra;n>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=ma;break}c.mode=ha;case ha:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=ma;break}q>c.wnext?(q-=c.wnext,r=c.wsize-q):r=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,r=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[r++];while(--q);0===c.length&&(c.mode=da);break;case ia:if(0===j)break a;f[h++]=c.length,j--,c.mode=da;break;case ja:if(c.wrap){for(;n<32;){if(0===i)break a;i--,m|=e[g++]<=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;F0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;Df||a===j&&L>g)return 1;for(;;){z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":41}],51:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return a<256?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;f<=W;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;co&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0;for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;d>=7;d8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;d<=c;d++)e=g,g=b[2*(d+1)+1],++h=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;e>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;b0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,f<=e&&(e=f)):e=f=c+5,c+4<=e&&b!==-1?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2)); +d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":41}],53:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}],54:[function(a,b,c){"use strict";b.exports="function"==typeof setImmediate?setImmediate:function(){var a=[].slice.apply(arguments);a.splice(1,0,0),setTimeout.apply(null,a)}},{}]},{},[10])(10)}); \ No newline at end of file diff --git a/src/blocks.js b/src/blocks.js index e6a94fc4c9..56c55ee00f 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -2137,7 +2137,9 @@ SyntaxElementMorph.prototype.isEmptySlot = function () { // SyntaxElementMorph speech bubble feedback: -SyntaxElementMorph.prototype.showBubble = function (value, exportPic, target) { +SyntaxElementMorph.prototype.showBubble = function ( + value, exportPic, target, forHelpScreen +) { var bubble, txt, img, @@ -2149,7 +2151,7 @@ SyntaxElementMorph.prototype.showBubble = function (value, exportPic, target) { sf = this.parentThatIsA(ScrollFrameMorph), wrrld = this.world(); - if ((value === undefined) || !wrrld) { + if ((value === undefined) || (!wrrld && !forHelpScreen)) { return null; } if (value instanceof ListWatcherMorph) { @@ -2180,6 +2182,8 @@ SyntaxElementMorph.prototype.showBubble = function (value, exportPic, target) { this.changed(); } }; + } else if (forHelpScreen) { + morphToShow = value; } else { img = value.fullImage(); morphToShow = new Morph(); @@ -2253,6 +2257,9 @@ SyntaxElementMorph.prototype.showBubble = function (value, exportPic, target) { Math.max(this.rounding - 2, 6), 0 ); + if (forHelpScreen) { + return bubble; + } bubble.popUp( wrrld, pos, @@ -3298,7 +3305,7 @@ BlockMorph.prototype.restoreInputs = function (oldInputs) { return leftOver; }; -BlockMorph.prototype.showHelp = function () { +BlockMorph.prototype.showHelp = function (lang) { var myself = this, ide = this.parentThatIsA(IDE_Morph), blockEditor, @@ -3308,7 +3315,10 @@ BlockMorph.prototype.showHelp = function () { comment, block, spec, - ctx; + sf, + padding = 15; + + lang = lang || SnapTranslator.language; if (this.isCustomBlock) { if (this.isGlobal) { @@ -3327,17 +3337,43 @@ BlockMorph.prototype.showHelp = function () { } } - pic.onload = function () { - help = newCanvas(new Point(pic.width, pic.height), true); // nonRetina - ctx = help.getContext('2d'); - ctx.drawImage(pic, 0, 0); + pic.onload = function () {; + help = new Morph(); + help.drawNew = function () { + var ctx; + this.image = newCanvas(this.extent()); + ctx = this.image.getContext('2d'); + ctx.drawImage(pic, 0, 0, this.width() - padding, this.height()); + }; + if (lang === 'old') { + help.setExtent(new Point(pic.width + padding, pic.height + padding)); + } else { + help.setExtent( + new Point(pic.width / 2 + padding, pic.height / 2) + ); + } + sf = new ScrollFrameMorph(); + sf.contents.add(help); + sf.setColor(DialogBoxMorph.prototype.color); + sf.setWidth(help.width()); + sf.setHeight(Math.min(help.height(), 400)); new DialogBoxMorph().inform( 'Help', null, myself.world(), - help + sf ); }; + pic.onerror = function () { + if (lang === 'old') { + return; + } + if (lang === 'en') { // fall back to old help screens + myself.showHelp('old'); + return; + } + myself.showHelp('en'); // fall back to english help screens + }; if (this.isCustomBlock) { def = this.isGlobal ? this.definition @@ -3362,7 +3398,9 @@ BlockMorph.prototype.showHelp = function () { return; } } - pic.src = ide.resourceURL('help', spec + '.png'); + pic.src = ide.resourceURL( + 'help', lang, spec + '.png' + ); }; // BlockMorph code mapping diff --git a/src/gui.js b/src/gui.js index 1b56b60bb4..795fc9924a 100644 --- a/src/gui.js +++ b/src/gui.js @@ -5914,7 +5914,7 @@ IDE_Morph.prototype.getURL = function (url, callback, responseType) { request[rsp] ); } else { - throw new Error('unable to retrieve ' + url); + callback.call(myself); } } }; diff --git a/src/widgets.js b/src/widgets.js index f807b9c3ab..a709b87b62 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -2927,7 +2927,7 @@ function AlignmentMorph(orientation, padding) { AlignmentMorph.prototype.init = function (orientation, padding) { // additional properties: this.orientation = orientation || 'row'; // or 'column' - this.alignment = 'center'; // or 'left' in a column + this.alignment = 'center'; // or 'left' in a column / 'top' in a row this.padding = padding || 0; this.respectHiddens = false; @@ -2961,7 +2961,9 @@ AlignmentMorph.prototype.fixLayout = function () { c.setPosition( lfb.topRight().add(new Point( myself.padding, - (lfb.height() - cfb.height()) / 2 + myself.alignment === 'center' ? + (lfb.height() - cfb.height()) / 2 + : 0 )) ); } else { // orientation === 'column'