Discuss Scratch
- Wetbikeboy2500
-
100+ posts
New Blocks for Displaying Text
I was recently looking at some projects, which were word editors, with the best word editor I found using the pen to make the letters, which doesn't look too nice. I thought about using clones for the letters but this would be too restricting and slow to deal with. So why not add a new block called the tell block(Name can be changed). It would display the text like how the say or think block does but with more flexibility. It wouldn't have a tail on it or be linked to a specific sprite. It would then have additional inputs for its position, width, and height while being displayed on the screen. This would eliminate the use of clones or pen to display text on screen which would just be easier for everyone.
Edit(2/12/19): If the height and width of the blocks are not big enough then the text would just overflow into space that can't be seen. This overflow could then be scrolled to see or automatically scroll as more text is added. The overflow would also happen in the x-axis or y-axis but may be too many inputs by then for this to be simple. Scratch needs a better dedicated text system, which could be implemented through extensions if thought too advance for new scratches, to help limit the slow and restrictive process with the current ways to display text dynamically.
Original Blocks:


-Multinia-'s idea:
These blocks would work within the pen extension a new extension which could be called the text extension. The alignment block is still a ambiguous though with how it would function. @imfh idea is to keep the rendering on an svg layer so no pixelation would occur with the text which would be a must if projects are to run across multiple devices and screens.
Supporters
Edit(2/12/19): If the height and width of the blocks are not big enough then the text would just overflow into space that can't be seen. This overflow could then be scrolled to see or automatically scroll as more text is added. The overflow would also happen in the x-axis or y-axis but may be too many inputs by then for this to be simple. Scratch needs a better dedicated text system, which could be implemented through extensions if thought too advance for new scratches, to help limit the slow and restrictive process with the current ways to display text dynamically.
Original Blocks:
tell [] at x() y() width() height() ::looks(Instead of tell it could instead say textbox)
tell [] for (2) secs at x() y() width() height() ::looks


-Multinia-'s idea:
set text style [sans-serif v] :: pen
set text size (12) pt :: pen
set text color [#ABCDEF] :: pen
set text alignment [left v] :: pen
draw text [hello world] at x: () y: () :: pen
These blocks would work within the pen extension a new extension which could be called the text extension. The alignment block is still a ambiguous though with how it would function. @imfh idea is to keep the rendering on an svg layer so no pixelation would occur with the text which would be a must if projects are to run across multiple devices and screens.
Supporters
Last edited by Wetbikeboy2500 (Nov. 5, 2021 02:22:17)
- awesome-llama
-
1000+ posts
New Blocks for Displaying Text
That is quite complicated. Beginners may find it hard to understand, and workarounds are possible.
no support
no support
- DrKat123
-
1000+ posts
New Blocks for Displaying Text
But the workarounds are really tedious That is quite complicated. Beginners may find it hard to understand, and workarounds are possible.
no support
And it's not gonna be too complicated for new scratchers.
So support
- KrazyKatProductions
-
42 posts
New Blocks for Displaying Text
This could be pretty helpful, but another thing you could do is “draw” your own sprite with text and have it switch costumes. It might still be useful though…
- Zekrom01
-
1000+ posts
New Blocks for Displaying Text
Here is an easy workaround:
... //the sprite should be invisible80% support, losing 20% due to the above workaround. However, since apparently the text can be resized, I would REALLY like that, so +10% support. Therefore, 90% support.
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
Last edited by Zekrom01 (Dec. 5, 2015 14:24:45)
- Wetbikeboy2500
-
100+ posts
New Blocks for Displaying Text
that is a way around it but there still is the thing that comes off the speech bubble which shows were the sprite is and the width is limited and thanks for the support no matter how much it is Here is an easy workaround:... //the sprite should be invisible80% support, losing 20% due to the above workaround. However, since apparently the text can be resized, I would REALLY like that, so +10% support. Therefore, 90% support. (be happy to put me in a semi-support list or something)
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
Last edited by Wetbikeboy2500 (Dec. 5, 2015 14:20:20)
- Zekrom01
-
1000+ posts
New Blocks for Displaying Text
no problem!that is a way around it but there still is the thing that comes off the speech bubble which shows were the sprite is and the width is limited and thanks for the support no matter how much it is Here is an easy workaround:... //the sprite should be invisible80% support, losing 20% due to the above workaround. However, since apparently the text can be resized, I would REALLY like that, so +10% support. Therefore, 90% support. (be happy to put me in a semi-support list or something)
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
- Scratcher1002
-
1000+ posts
New Blocks for Displaying Text
Support and:
Unfortunately, that won't work to put it on the bottom of the screen because sprites can't go completely off the screen.no problem!that is a way around it but there still is the thing that comes off the speech bubble which shows were the sprite is and the width is limited and thanks for the support no matter how much it is Here is an easy workaround:... //the sprite should be invisible80% support, losing 20% due to the above workaround. However, since apparently the text can be resized, I would REALLY like that, so +10% support. Therefore, 90% support. (be happy to put me in a semi-support list or something)
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
- powershack
-
1000+ posts
New Blocks for Displaying Text
Support for something like theres a dropdown menu after the say block:
And you could change it to:
Also would support a popup text feature
say [] for (2) secs [bubble v] ::looksThat would be the default text bubble
And you could change it to:
say [] for (2) secs [bottom v] ::looksOr
say [] for (2) secs [top v] ::looksWhich would show the text either at the bottom or the top.
Also would support a popup text feature
say [] for (2) secs [popup v] ::looks
- Zekrom01
-
1000+ posts
New Blocks for Displaying Text
btw You can actually put me on support since I give 90% supportthat is a way around it but there still is the thing that comes off the speech bubble which shows were the sprite is and the width is limited and thanks for the support no matter how much it is Here is an easy workaround:... //the sprite should be invisible80% support, losing 20% due to the above workaround. However, since apparently the text can be resized, I would REALLY like that, so +10% support. Therefore, 90% support. (be happy to put me in a semi-support list or something)
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
Last edited by Zekrom01 (Dec. 5, 2015 16:26:17)
- 1004587
-
1000+ posts
New Blocks for Displaying Text
Semi-Support because it's hard to do, but workaroundable
but the workaround is kinda hard to figure out
but the workaround is kinda hard to figure out
Last edited by 1004587 (Jan. 10, 2016 03:52:07)
- Sheep_tester
-
500+ posts
New Blocks for Displaying Text
Support, the workaround is tedious and uses up too much project space, making the project take longer to load. However, I think the blocks should just be simplified to:
switch costume to text [] font [Helvetica v] :: looks
- buurmas
-
7 posts
New Blocks for Displaying Text
I support this. You could also call it “textbox” instead of “tell”, although I admit that's not a verb!
“Say” is handy, but being unable to specify the width means you can't get it to fit in with other elements of the screen the way you want. My use case right now is an adventure game with multiple rooms. I want a text box to display a description of the room. However, I might abandon this whole approach and instead create a sprite in the shape of a text box with different costumes for the different canned texts I want to use.
“Say” is handy, but being unable to specify the width means you can't get it to fit in with other elements of the screen the way you want. My use case right now is an adventure game with multiple rooms. I want a text box to display a description of the room. However, I might abandon this whole approach and instead create a sprite in the shape of a text box with different costumes for the different canned texts I want to use.
- stickfiregames
-
1000+ posts
New Blocks for Displaying Text
Support, but I would call it textbox as well.
- Charles12310
-
1000+ posts
New Blocks for Displaying Text
Support for text displaying. The workaround is very complicated and difficult, and it's not just something like this:
I do think that this should be a pen block instead:
define write (string) at x:(x):y(y) with size: (s)It requires more work than that for a very accurate text engine.
hide
set size to (s)%
go to x:(x)y:(y)
set [letter v] to [0]
repeat (length of (string))
change [letter v] by (1)
change x by (5)
switch costume to (letter (letter) of (string))
stamp
end
I do think that this should be a pen block instead:
write text [] at x: () y: () with size: () :: pen
- fphiladelphia
-
1000+ posts
New Blocks for Displaying Text
Please don’t necropost Support for text displaying. The workaround is very complicated and difficult, and it's not just something like this:define write (string) at x:(x):y(y) with size: (s)It requires more work than that for a very accurate text engine.
hide
set size to (s)%
go to x:(x)y:(y)
set [letter v] to [0]
repeat (length of (string))
change [letter v] by (1)
change x by (5)
switch costume to (letter (letter) of (string))
stamp
end
I do think that this should be a pen block instead:write text [] at x: () y: () with size: () :: pen
- Charles12310
-
1000+ posts
New Blocks for Displaying Text
Necroposting is fine on the suggestions as long as the recent post is relevant.Please don’t necropost Support for text displaying. The workaround is very complicated and difficult, and it's not just something like this:define write (string) at x:(x):y(y) with size: (s)It requires more work than that for a very accurate text engine.
hide
set size to (s)%
go to x:(x)y:(y)
set [letter v] to [0]
repeat (length of (string))
change [letter v] by (1)
change x by (5)
switch costume to (letter (letter) of (string))
stamp
end
I do think that this should be a pen block instead:write text [] at x: () y: () with size: () :: pen