This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-04-21 12:28:28

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Line separator in blocks palette

I am trying to create a line separator in the Control category of the blocks palette, just like the one that exists in Sensing, between "loud?" and "... sensor value" blocks. I looked at the source code of blockSpecs, under ScratchSpriteMorph, and found that the character responsible for presenting the line was the tilde (~). I tried to use it in Control but it doesn't show up in Scratch. I also tried to use it under other categories such as Looks, Sound, Operators, Lists, and it didn't work except for Sensing. Is there any reasonable explanation? Why can't I add a line separator in any other category except Sensing?

Offline

 

#2 2011-04-21 12:30:32

OSproject
Scratcher
Registered: 2011-04-19
Posts: 44

Re: Line separator in blocks palette

I thought it was the = sign, but that doesn't work either. I don't know.

Offline

 

#3 2011-04-21 12:34:13

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Line separator in blocks palette

the = sign works, but only in the sensing category (because it has a special code that recognizes it).

To make all categories recognize the = sign, you need to change a bunch of stuff in the viewBlocksForCategory: method in ScriptableScratchMorph ('blocks' section)  smile

Offline

 

#4 2011-04-21 13:25:39

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Line separator in blocks palette

Ok I thought it was some kind of mistyping error that would have a simple solution, but since it deals with changing "a bunch of stuff" in methods, I guess I'll leave this for sometime later, since I have higher priority tasks to accomplish.

Thanks for the replies.

Offline

 

Board footer