scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.42k stars 3.51k forks source link

Will a pen text block be added into Scratch? #5714

Open cyx2015s opened 4 years ago

cyx2015s commented 4 years ago

Will a pen text block be added into Scratch?

If it can be added, pen projects will be much more simpler.

(Screenshot taken from another website) IMG_20200507_062746

BoomerScratch commented 4 years ago

No, i don't think so. You do have one in Snap: image

benjiwheeler commented 4 years ago

There has been some thinking about this over the years, but there has never been a design proposal that everyone felt fit just right. Proposals for how this would work are welcome. How would positioning work? How would font choice work? How would size work? How would multiple lines work?

griffpatch commented 4 years ago

You could go down the route of adding it to pen, using pen width to set the size of the font (relative). Or you could add a text extension that have you more control including font size, alignment and text width reporters.

To be honest, of prefer the latter, and it might be worth considering allowing the text later to be able to be at the front of all other layers...? As you say it's a hard call though as there are so many use cases that vary what works be most useful. If the text is limited to pen then it will look bad...

How about a completely new idea, a scratch block that changes the costume of the current sprite into the vector costume of a given text string for example? Then we could create clones, order then, move them, rotate them, add effects... Could be great! Just what I need lol :)

On Fri, 8 May 2020, 05:30 Benjamin Wheeler, notifications@github.com wrote:

There has been some thinking about this over the years, but there has never been a design proposal that everyone felt fit just right. Proposals for how this would work are welcome. How would positioning work? How would font choice work? How would size work? How would multiple lines work?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LLK/scratch-gui/issues/5714#issuecomment-625623833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTM3PX2YMQPMAWW2AMZ7HDRQODHHANCNFSM4M22O7NA .

griffpatch commented 4 years ago

So... That costume idea, when you use the set text costume to "griffpatch", the current sprite costume is generated in the fly too the text "griffpatch". I can size and position and even stamp it if required. Then if I use "set costume" afterwards the sprite will return to the normal costumes (and the text costume will cease to exist). You would still need to consider how to select font, and text alignment, etc

On Fri, 8 May 2020, 08:23 Andrew Griffin, andy@griffpatch.co.uk wrote:

You could go down the route of adding it to pen, using pen width to set the size of the font (relative). Or you could add a text extension that have you more control including font size, alignment and text width reporters.

To be honest, of prefer the latter, and it might be worth considering allowing the text later to be able to be at the front of all other layers...? As you say it's a hard call though as there are so many use cases that vary what works be most useful. If the text is limited to pen then it will look bad...

How about a completely new idea, a scratch block that changes the costume of the current sprite into the vector costume of a given text string for example? Then we could create clones, order then, move them, rotate them, add effects... Could be great! Just what I need lol :)

On Fri, 8 May 2020, 05:30 Benjamin Wheeler, notifications@github.com wrote:

There has been some thinking about this over the years, but there has never been a design proposal that everyone felt fit just right. Proposals for how this would work are welcome. How would positioning work? How would font choice work? How would size work? How would multiple lines work?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LLK/scratch-gui/issues/5714#issuecomment-625623833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTM3PX2YMQPMAWW2AMZ7HDRQODHHANCNFSM4M22O7NA .

apple502j commented 4 years ago

Here's my idea: Text Extension write [] - write the text using current settings. the text won't be updated when they change. set color to [] - set color using color set () to () - set width and color using numeric value like Pen change () by () - see above set font to () - setting the font, the option is just paint editor's width of [] - calculating width of the text. this may be slow but who knows clear all text - clearing all text

position: the sprite's X and Y is used alignment: I think, with all those blocks above, it's possible to do it user-side. layer: I think the front layer is good, but maybe we can add options to change it to "between stage and pen", or "under pen".

jeffalo commented 4 years ago

this is something that i would really like to see, it seems like a very simple feature that would really lower the bar of entry for some really nice things. right now if you want to print custom text, you'll have to use someone's PTE or CTE but they're not exactly very efficient or easy to use as something built into scratch.

people can be more creative if they can print text to the screen, right now it seems like a really odd limitation of scratch.

edit: i think a good group of people to ask about the design for something like this would be the people who make PTEs or CTEs on scratch.

in my opinion, this would be an extension of the pen extension. i think the whole costume idea seems a bit over complicated

edit edit: thinking about it more, i think @griffpatch's idea is the best, as it would be the "scratch" way of doing it, and would have a lot more power. for example, i could make clones of text and move them around as i wish, ooh just thinking about it makes me excited to make stuff with it

benjiwheeler commented 4 years ago

I agree with @griffpatch that it would be useful to be able to revise the text's content without having to redraw any overlapping pen drawing. That would require that a piece of text be kept track of as an instance.

To elaborate on the "costume" approach, but with some changes from @griffpatch's proposal...

One way to do this would be:

  1. introduce a positionable text extension
  2. when positionable text extension is present, each sprite (and each clone) can have up to one text instance
  3. the text would be located at the sprite's location, so all move blocks, color blocks and size blocks would work as normal
  4. the text would appear over the sprite's costume; to make the text appear with nothing else, create or choose an empty costume
  5. under the hood, the scratch vm would see the costume as a dynamically generated image, with svg text added on top of the costume. Thus the vm wouldn't have to even know about the text.
  6. extension blocks would exist to change that sprite's text's content, font, and justification (left/center/right), as @griffpatch suggested
  7. multi-line text could also be possible, if blocks are added to set line height and margin width
ericrosenbaum commented 4 years ago

I'm interested in this as well (and have thought about it for a long time). I'm hoping to do some prototyping so we can compare these different concepts. My guess is that the idea where a sprite's costume becomes text (or the text is layered onto it) will be the one that feels simplest and most powerful. Even though it is different from existing PTEs, it should be more accessible to beginners, and still afford most or all of the same flexibility. I think! We gotta try it...

Explosion-Scratch commented 4 years ago

I think what @griffpatch suggested sounds like a great idea! With this there would be very precise controll of things like text wrapping, size, color etc. in an intuitive way.

Kenny2github commented 4 years ago

@benjiwheeler Just noting that if multi-line text is supported, vertical align comes into play too (in addition to justification).

cyx2015s commented 4 years ago

I think implementing a text extension (either with pen or with costume) will make Scratch projects much more expandable, lighter and faster. Recently I saw a project called Ivis's Fantasy, in order to display the conversation char by char, he created more than 800 costumes(Of course he did it by using a program to add text costumes automatically). He is a Chinese Scratcher. Lastly, I think both pen text and costume text are important.

griffpatch commented 4 years ago

If you have costume text, then you should be able to stamp which gives you the pen text for free... which is rather neat. One note, if the text was to be 'added' to an existing costume, the downside is that 'touching' blocks would then report they were touching the sprite if they touched the text... but I guess there are issues with that in all sprite based text ideas. It would be super nice if scratch had an 'exclude from touching' toggle feature on sprites so you could make clones and opt in or out of touching per clone... but that's another issue :)

On Thu, 14 May 2020 at 11:51, cyx2015s notifications@github.com wrote:

I think implementing a text extension (either with pen or with costume) will make Scratch projects much more expandable, lighter and faster. Recently I saw a project called Ivis's Fantasy, in order to display the conversation char by char, he created more than 800 costumes(Of course he did it by using a program to add text costumes automatically). He is a Chinese Scratcher. Lastly, I think both pen text and costume text are important.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LLK/scratch-gui/issues/5714#issuecomment-628554258, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTM3PSHRGOT3B6J7Z2T4FDRRPEJNANCNFSM4M22O7NA .

Explosion-Scratch commented 4 years ago

@griffpatch. The problem with adding toggles and setting such as alignment, exclude from touching, etc. is that eventually the system gets to complex and confusing for scratchers, especially new scratchers. Another problem with the costume based approach is that when using the stamp block the quality of the stamp is much lower than that of the sprite. Therefre in my opinion a costume based approach is still better as it keeps scratch being intuitive while still adding features that if added in a different manner could be seen as advanced and/or confusing. Also for the touching problem could you use broadcasts and a run with out screen refresh custom block to wuickly hide, sense then show again?

GrahamSH-LLK commented 4 years ago

@cyx2015s By the way, what website is that?

cyx2015s commented 4 years ago

@cyx2015s By the way, what website is that?

www.aerfaying.com

redstone-dev commented 4 years ago

Cool idea, I support 👍🏻

Explosion-Scratch commented 4 years ago

Same here! :) This sounds cool.

sceatcher3 commented 4 years ago

Look forward to this new feature.

griffpatch commented 3 years ago

Woo-hoo!!! https://lab.scratch.mit.edu/text/ Loving seeing the text costume idea implemented in Scratch Labs - I think it's brilliant and exactly what I was getting at :)

Here's my feedback:

Thanks for looking at adding this amazing feature!

Griffpatch

ericrosenbaum commented 3 years ago

Thanks for your feedback @griffpatch!

re: rotation center of multiline text, I see your point about rotation. I was thinking about the use case of a "text box", where you have a fixed region where you want to display the text. In that case I think it's better to put the rotation center on the top line, so you can consistently position the text no matter how many lines you have.

re: size reporters, can you give an example of a use case there?

re: shadow and outline effects, I agree it would be great to have something like this. I experimented with adding outlines, but some of our fonts do not render them correctly (you can see the same bug when adding outlines to text in the paint editor- you get weird spiky artifacts). I also worked a bit on adding something more like a "highlight", a colored box behind the text, which is another way to address the problem of readability on busy backgrounds- I just ran out of time on that.

griffpatch commented 3 years ago

Rotation Centers: I do agree that the positioning of the text as it is does make sense for a lot of scenarios - Which is why I wondered whether you might need a way of changing the vertical alignment just as you can the horizontal alignment?

Size Reporters: The case for this is where you want to have one word in a different color, or include icons in your text, etc so you can write some text, clone then move the sprite by the width of the text and change the costume, etc... This might have it's place though as a global feature that could be useful - but TBH would not be a massive loss not to have, just more so in this case as we've never had a costume that we didn't otherwise know the width of before like this - and possibly more importantly the height as it can wrap and cause us potential layout issues...

Shadow/Outline: Yeah, I've seen the problems with giving our fonts outlines (extended pointy corners). Is it possible we need to apply a different stroke line joining mode? https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin

I do hope more time can be scheduled for this amazing new feature - It will make a lot of Scratchers VERY happy - The community has been buzzing about it... There are a lot of calls for integration with google fonts ;) lol

On Wed, 3 Feb 2021 at 21:39, Eric Rosenbaum notifications@github.com wrote:

Thanks for your feedback @griffpatch https://github.com/griffpatch!

re: rotation center of multiline text, I see your point about rotation. I was thinking about the use case of a "text box", where you have a fixed region where you want to display the text. In that case I think it's better to put the rotation center on the top line, so you can consistently position the text no matter how many lines you have.

re: size reporters, can you give an example of a use case there?

re: shadow and outline effects, I agree it would be great to have something like this. I experimented with adding outlines, but some of our fonts do not render them correctly (you can see the same bug when adding outlines to text in the paint editor- you get weird spiky artifacts). I also worked a bit on adding something more like a "highlight", a colored box behind the text, which is another way to address the problem of readability on busy backgrounds- I just ran out of time on that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LLK/scratch-gui/issues/5714#issuecomment-772842282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTM3PUGJX2WQ3PAMSFYEUDS5G7CLANCNFSM4M22O7NA .

cyx2015s commented 3 years ago

404

Secret-chest commented 1 year ago

I suggest removing the animations, they inhibit creativity.

benjiwheeler commented 1 year ago

One thing I keep wishing for, when playing with this: the ability to show text AND the sprite's costume, at the same time. Then you could, for example, easily create a button as a single sprite, and have it change size and color and other effects always in sync.

griffpatch commented 1 year ago

True, but then having to use the set sprite size to change font size would need to be independent?

On Wed, 26 Oct 2022, 18:59 Benjamin Wheeler, @.***> wrote:

One thing I keep wishing for, when playing with this: the ability to show text AND the sprite's costume, at the same time. Then you could, for example, easily create a button as a single sprite, and have it change size and color and other effects always in sync.

— Reply to this email directly, view it on GitHub https://github.com/LLK/scratch-gui/issues/5714#issuecomment-1292405990, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTM3PUBZY4BESMI7SPDCX3WFFWORANCNFSM4M22O7NA . You are receiving this because you were mentioned.Message ID: @.***>

Secret-chest commented 1 year ago

I suggest removing the animations, they inhibit creativity.

Because you can easily make them yourself.

mxmou commented 1 year ago

I suggest removing the animations, they inhibit creativity.

Because you can easily make them yourself.

I don't think there's an easy way to implement the rainbow animation without the block. The workarounds for type and zoom are quite simple but they might not be obvious to new users.

Secret-chest commented 1 year ago

I suggest removing the animations, they inhibit creativity.

Because you can easily make them yourself.

I don't think there's an easy way to implement the rainbow animation without the block. The workarounds for type and zoom are quite simple but they might not be obvious to new users.

I still think such a specific block is not needed.

Secret-chest commented 1 year ago

I suggest removing the animations, they inhibit creativity.

Because you can easily make them yourself.

I don't think there's an easy way to implement the rainbow animation without the block. The workarounds for type and zoom are quite simple but they might not be obvious to new users.

The same users should learn about loops.