jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.51k stars 745 forks source link

Text-Tool or Text box object #2314

Open nomisge opened 5 years ago

nomisge commented 5 years ago

I'm planning to have my students code some games. Last year I did it with scratch. Some of my students would make games with a menu to select levels etc. They would draw buttons as costumes and would be able to act on click events etc.. With Snap! I find this to be difficult, because I can't create a simple button the easy way. I read through #122 and #686. I understand that stamping text works, but to make a button out of it (in code, since editing is not available through the costume editor) is way too complicated (I would have to stamp it, make a costume out of it, save it in a variable, etc...). I there a way to stamp onto an object rather then the background? Or better yet real text box objects as thought about in #122 , usable as costumes? Thanks.

Naharie commented 5 years ago

@nomisge While I'm not one of the people who works on Snap!, I think I might be able to help.

Have you tried stamping the text, and then copying it into a costume using the pentrails block? That way your students can use a sprite wearing the pen trails as a costume as the button.

nomisge commented 5 years ago

@KingDavid12 This is exactly what I tried. The issue is, that it's only available/editable trough code afterwards, not in the editor anymore. A solution would be, creating a costume, drawing everything but text in the editor, stamping costume + text, make it a costume through pentrails and assign it to a variable, and repat the process so to have different costumes available. Or have to objects (one the colors etc.) one for the text and link them together.

But for absolute beginners I find this not intuitive nor easy to do. I would prefer a text tool in the editor.

Naharie commented 5 years ago

@nomisge Ah! You working with beginners. I agree that the editor should probably have some kind of text tool, but for now, the closest you can get is to make a library with custom blocks to make it easier on the students.

brianharvey commented 5 years ago

make-button

... but yes, a text box object is on my list.

nomisge commented 5 years ago

@brianharvey .. this works reasonably good. Thanks.