Would Deborah's Translatable Help Screens…

…make this a possibility?:

(i.e., dragging blocks and scripts out from a help screen)

I think it's a lot of work because they need to assign a hitbox and a script for each script in every picture. I think it's definitely not going to be done anytime soon but I don't know for sure.


So it wouldn't be that hard. All you'd have to do is set a block's "isDraggable" flag to false, set its "isTemplate" flag to true, and put it in the help screen. Morph would take care of dragging it, making it a palette-type template block, (i.e., when you drag it it clones itself and the clone is picked up instead of the original) and knowing its hitbox.

Could you do that in your Text-Based Snap!?

I'd need to find Dylan's code.

It's a good idea. I have no idea how hard it'd be to implement. I think I can confidently promise that it won't be in the first release of the new help system, though.

If you're using a GitHub fork, I think you can make a PR on your repo to merge djsrv:help-screens into your branch and merge it.
Otherwise, you can go to the branch, download it and paste your Text-Based Snap source on top of it.

I am.

I'm not sure how.

Scripts are put into Help Screen as an image of ScriptDiagramMorph.scriptContainer.

Yes, so I'd have to edit it to put an actual script there.

I believe Dylan has already written that part.

"Script" as in "a group of BlockMorphs."

?? Isn't that what a script always is?

Yes. That's exactly what I said. ("sais"? [quote="warped_wart_wars"]I can't type[/quote])

What currently gets put in the help screen is an image of the script, as a Morph.

Right, that's why I'm pushing for including the XML in script pics! That would make the pictures automatically translatable. (Although iirc the help screen language takes the xml, rather than a picture, as the basis for translation.)

@djdolphin, want to straighten us out about all this?

I'll actually go check that and see what Morph it is exactly.

@dardoro made a "Script pic with XML" menu item. You could borrow that.

Yeah. Since he just appended the XML to the PNG, it works for reading into Snap!, but we have to make sure the expanded picture works in Word and in Preview and in Photoshop and in a zillion other programs. Michael has a student working on this, I think.

(There's an official way to add metadata to PNGs that we're also looking into.)

I could have sworn there was a "comment" section in the properties of a file.

Yeah. Do you know what the syntax is for a comment? In particular, can it include XML tags?

IDK. I just saw it with a right-click>Properties>Details: (On Windows, not sure of the equivalent for Mac.)
Screenshot (183)

(IDK why it selected "Attributes")
Also, I think it can have theoretically anything.