Discuss Scratch

Wetbikeboy2500
Scratcher
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:
tell [] at x() y() width() height() ::looks

tell [] for (2) secs at x() y() width() height() ::looks
(Instead of tell it could instead say textbox)



-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
  1. DrKat123
  2. Mrcomputer1
  3. Scratcher1002
  4. Zekrom01
  5. powershack
  6. 1004587
  7. Sheep_tester
  8. JonathanSchaffer
  9. buurmas
  10. stickfiregames
  11. Charles12310
  12. Robby_Blue
  13. CoolPenguin10
  14. LuckyLucky7
  15. -Multinia-
  16. coder2045
  17. VFDan
  18. VFDan
  19. –Explosion–
  20. jeffyTheKodeKing
  21. RadiusGames46

Last edited by Wetbikeboy2500 (Nov. 5, 2021 02:22:17)


Scratch Made In JavaScript: https://scratch.mit.edu/discuss/topic/171842
Scratch Browser: https://scratch.mit.edu/discuss/topic/285957/
SB2Downloader: https://scratch.mit.edu/discuss/topic/295425/
Multiple work stations: https://scratch.mit.edu/discuss/topic/122484/
New Blocks for Displaying Text: https://scratch.mit.edu/discuss/topic/171508
Sprite Folders: https://scratch.mit.edu/discuss/topic/171569/
Find code easier: https://scratch.mit.edu/discuss/topic/144748/
A Support Button or No support Button: https://scratch.mit.edu/discuss/topic/181154/
I want Scratch grow and become a better place for everyone to come and use. So Scratch needs to expand and have more options for everyone.Scratch needs to break the boundaries and not be trapped by what is familiar to Scratch community
awesome-llama
Scratcher
1000+ posts

New Blocks for Displaying Text

That is quite complicated. Beginners may find it hard to understand, and workarounds are possible.
no support


DrKat123
Scratcher
1000+ posts

New Blocks for Displaying Text

awesome-llama wrote:

That is quite complicated. Beginners may find it hard to understand, and workarounds are possible.
no support
But the workarounds are really tedious
And it's not gonna be too complicated for new scratchers.
So support

Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun

λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
Mrcomputer1
Scratcher
500+ posts

New Blocks for Displaying Text

Support

My Profile / My User Page / My Talk Page
——————–
Progress bar to 1000+ Posts - Image might not be up to date

——————–
My browser / operating system: Windows NT 10.0 (Windows 11 - 22H2), Firefox 122.0b4
——————–
My ScratchX Extensions——–If you like this post, give me an internet!——–Sharp Scratch Mod
KrazyKatProductions
Scratcher
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…

when [Bored v] > (1000000)
if <[Computer_Charge] > [0 ]> then
go to [Scratch v]

end
This signature is protected by AEKP (Anti Evil Kumquat Protection). Get you own protection by following these steps: (message eaten by evil kumquat)
Zekrom01
Scratcher
1000+ posts

New Blocks for Displaying Text

Here is an easy workaround:
... //the sprite should be invisible
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
80% 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.

Last edited by Zekrom01 (Dec. 5, 2015 14:24:45)


20 something years old
Probably doing college work
Wetbikeboy2500
Scratcher
100+ posts

New Blocks for Displaying Text

Zekrom01 wrote:

Here is an easy workaround:
... //the sprite should be invisible
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
80% 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)
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

Last edited by Wetbikeboy2500 (Dec. 5, 2015 14:20:20)


Scratch Made In JavaScript: https://scratch.mit.edu/discuss/topic/171842
Scratch Browser: https://scratch.mit.edu/discuss/topic/285957/
SB2Downloader: https://scratch.mit.edu/discuss/topic/295425/
Multiple work stations: https://scratch.mit.edu/discuss/topic/122484/
New Blocks for Displaying Text: https://scratch.mit.edu/discuss/topic/171508
Sprite Folders: https://scratch.mit.edu/discuss/topic/171569/
Find code easier: https://scratch.mit.edu/discuss/topic/144748/
A Support Button or No support Button: https://scratch.mit.edu/discuss/topic/181154/
I want Scratch grow and become a better place for everyone to come and use. So Scratch needs to expand and have more options for everyone.Scratch needs to break the boundaries and not be trapped by what is familiar to Scratch community
Zekrom01
Scratcher
1000+ posts

New Blocks for Displaying Text

Wetbikeboy2500 wrote:

Zekrom01 wrote:

Here is an easy workaround:
... //the sprite should be invisible
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
80% 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)
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
no problem!

20 something years old
Probably doing college work
Scratcher1002
Scratcher
1000+ posts

New Blocks for Displaying Text

Support and:

Zekrom01 wrote:

Wetbikeboy2500 wrote:

Zekrom01 wrote:

Here is an easy workaround:
... //the sprite should be invisible
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
80% 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)
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
no problem!
Unfortunately, that won't work to put it on the bottom of the screen because sprites can't go completely off the screen.
powershack
Scratcher
1000+ posts

New Blocks for Displaying Text

Support for something like theres a dropdown menu after the say block:
say [] for (2) secs [bubble v] ::looks
That would be the default text bubble
And you could change it to:
say [] for (2) secs [bottom v] ::looks
Or
say [] for (2) secs [top v] ::looks
Which 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
Scratcher
1000+ posts

New Blocks for Displaying Text

Wetbikeboy2500 wrote:

Zekrom01 wrote:

Here is an easy workaround:
... //the sprite should be invisible
go to x: (n1) y: (n2) //replace n1 and n2 with a number
say [Hello!] for (n3) secs //replace n3 with a number
...
80% 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)
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
btw You can actually put me on support since I give 90% support

Last edited by Zekrom01 (Dec. 5, 2015 16:26:17)


20 something years old
Probably doing college work
1004587
Scratcher
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

Last edited by 1004587 (Jan. 10, 2016 03:52:07)

Sheep_tester
Scratcher
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

The above post was most likely written by a sheep. Advertisements:
hydronesium
Scratcher
6 posts

New Blocks for Displaying Text

Dont belive stuff
JonathanSchaffer
Scratcher
1000+ posts

New Blocks for Displaying Text

support

club penguin is kil
buurmas
Scratcher
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.
stickfiregames
Scratcher
1000+ posts

New Blocks for Displaying Text

Support, but I would call it textbox as well.










If you can read this, my signature cubeupload has been eaten by an evil kumquat!




or you just used Inspect Element, you hacker

;
Charles12310
Scratcher
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:
define write (string) at x:(x):y(y) with size: (s)
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
It requires more work than that for a very accurate text engine.

I do think that this should be a pen block instead:

write text [] at x: () y: () with size: () :: pen


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
fphiladelphia
Scratcher
1000+ posts

New Blocks for Displaying Text

Charles12310 wrote:

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)
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
It requires more work than that for a very accurate text engine.

I do think that this should be a pen block instead:

write text [] at x: () y: () with size: () :: pen
Please don’t necropost

I'm back…..yay!
not really tho
Charles12310
Scratcher
1000+ posts

New Blocks for Displaying Text

fphiladelphia wrote:

Charles12310 wrote:

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)
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
It requires more work than that for a very accurate text engine.

I do think that this should be a pen block instead:

write text [] at x: () y: () with size: () :: pen
Please don’t necropost
Necroposting is fine on the suggestions as long as the recent post is relevant.


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!

Powered by DjangoBB