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

#51 2012-06-01 22:37:43

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

suneel wrote:

majormax wrote:

Okay.... so I pressed Do it and exited the window, but it said "Changes have not been saved. Is it okay to cancel those changes?" I copied all the code. Do you have to keep the paratheses? I have to go to my cousins right now, so I can't test it.

Nice button majormax. Where did u get it?

That was posted around 2 years ago. It is likely that he will not respond.
He probably used GIMP to make it.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#52 2012-07-13 13:01:27

ke1235
Scratcher
Registered: 2010-03-07
Posts: 56

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

nathanprocks wrote:

the button sits underneath the frame! how do i fix that?

Change the t1 size // 2 to ((t1 size / 2) rounded...).
make sure it has one "/"

Offline

 

#53 2012-07-14 10:13:02

ZacIsCool
Scratcher
Registered: 2012-02-24
Posts: 30

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

nXIII wrote:

scratchycat625625 wrote:

nXIII wrote:

A couple things:

1. You might want to encourage people to use the Scratch Source Code instead
2. In order to add new ScratchSkin items, open a class browser and navigate to "Scratch-UI-Panes"->"ScratchFrameMorph"->"class"->"scratch skin"->"readSkinFrom:"
Next, make sure you have the ScratchSkin folder (named exactly like that, available from the source code page) in the same folder as ScratchSource1.4.image. Add three .gifs to this: (your category).gif, (your category)Over.gif, and (your category)Pressed.gif
3. You can also make colors with (Color r:g:b smile
PS: Credits? ScratchReallyRocks (I think s/he did some of the stuff with the actual adding), me (for the odd number hack and adding images to the ScratchSkin), etc.

Oh no, my (Color r:g:b smile  has turned into a smiley!

In all the other tab colour definitions, the format uses HSV...

You can use r:g:b:, it doesn't matter.

r:g:b: is the red green blue ratio.
HSV is "hue (0 - 300) saturation (0 - 1) and v is for some fancy word that means brightness, also on a scale of 0 - 1. They both work, but hsv gives you more control if you know how to use it, because you can control all three things,, whereas rgb only controls the hue. If you want to use hsv but are new to it, set s and v to 0.5 and h to your color. red is 0, purple is 300, green is 150, etc.

Offline

 

#54 2012-07-20 15:46:35

lallaway12
Scratcher
Registered: 2012-01-04
Posts: 500+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

Im useing that for om mod unbelievable!


http://i49.tinypic.com/2re4ied.png

Offline

 

#55 2012-07-24 17:17:36

ZacIsCool
Scratcher
Registered: 2012-02-24
Posts: 30

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

scratchycat625625 wrote:

Tons of people ask this question SO WE SHOULD MAKE A STICKY TO ANSWER IT.
Here's how.
1. Shift click the R in the Scratch logo (top left) and choose 'turn fill screen off'.
2. Middle click anywhere in scratch. At the bottom there should be pink text saying 'ScratchFrame'.
3. At the very top, 2nd from the left, there is a red icon. Click it and go to debug/inspect morph.
4. A window should open up. In the bottom frame, enter this code and replace (category) with your category name:

Code:

ScratchSkin at: #(category) put: (ScratchFrameMorph skinAt: #control).
ScratchSkin at: #(category)Over put: (ScratchFrameMorph skinAt: #controlOver).
ScratchSkin at: #(category)Pressed put: (ScratchFrameMorph skinAt: #controlPressed).

Highlight all the code, right click and press Do it.
5. Click anywhere on the grey and choose open/browser from that menu.
6. Go to Scratch-UI-Panes/ScratchViewerMorph/accessing/rebuildCategorySelectors. The 3rd line should look something like this:

Code:

t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables ).

Add your new category to the end, so it looks like

Code:

t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables #(new category) ).

Again, replace (new category) with your new category name.#
IF YOU WANT AN ODD NUMBER OF CATEGORIES, YOU NEED THIS CHANGE
If you need and odd number of categories, near the bottom there is code that says:

Code:

catButtonsExtent < 2 * t2 x + (3 * t9) @ (t1 size // 2 ...)

Change the t1 size // 2 to ((t1 size / 2) rounded...).
Right click on the code and press Accept.
7. Shift click on the R again and choose 'save image for end user'.
8. Open up scratch again and tadaa!
OPTIONAL: CUSTOM BLOCK COLOURS
I don't know how to change tab colours, but I do know how to change the colours for the blocks inside.
1. Exit fill screen mode and open up the browser again.
2.Go into Scratch-Objects/ScriptableScratchMorph AND CLICK THE CLASS BUTTON/block specs/blockColorFor:
3.Scroll down and put this code after the sensing bit:

Code:

'(category name)' = t1 ifTrue: [^ Color
    h:0
    s:0
    v:0].

As usual, replace (category name) with your new category name and replace HSV with a HSV colour code.
Hope this helps  smile

It says:

only integers should be used as indices
UndefinedObject(Object)>>error:
UndefinedObject(Object)>>errorNonIntegerIndex
UndefinedObject(Object)>>at:put:
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:
TextMorphEditor(ParagraphEditor)>>evaluateSelection
[] in PluggableTextMorph>>doIt
[] in PluggableTextMorph>>handleEdit:
TextMorphForEditView(TextMorph)>>handleEdit:
PluggableTextMorph>>handleEdit:

Offline

 

#56 2012-07-31 22:02:17

theamazingblob
Scratcher
Registered: 2011-11-19
Posts: 45

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

Thanks, this works great!  I just have one question, how do I put blocks in the new category?

Offline

 

#57 2012-07-31 22:05:17

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

ZacIsCool wrote:

scratchycat625625 wrote:

Tons of people ask this question SO WE SHOULD MAKE A STICKY TO ANSWER IT.
Here's how.
1. Shift click the R in the Scratch logo (top left) and choose 'turn fill screen off'.
2. Middle click anywhere in scratch. At the bottom there should be pink text saying 'ScratchFrame'.
3. At the very top, 2nd from the left, there is a red icon. Click it and go to debug/inspect morph.
4. A window should open up. In the bottom frame, enter this code and replace (category) with your category name:

Code:

ScratchSkin at: #(category) put: (ScratchFrameMorph skinAt: #control).
ScratchSkin at: #(category)Over put: (ScratchFrameMorph skinAt: #controlOver).
ScratchSkin at: #(category)Pressed put: (ScratchFrameMorph skinAt: #controlPressed).

Highlight all the code, right click and press Do it.
5. Click anywhere on the grey and choose open/browser from that menu.
6. Go to Scratch-UI-Panes/ScratchViewerMorph/accessing/rebuildCategorySelectors. The 3rd line should look something like this:

Code:

t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables ).

Add your new category to the end, so it looks like

Code:

t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables #(new category) ).

Again, replace (new category) with your new category name.#
IF YOU WANT AN ODD NUMBER OF CATEGORIES, YOU NEED THIS CHANGE
If you need and odd number of categories, near the bottom there is code that says:

Code:

catButtonsExtent < 2 * t2 x + (3 * t9) @ (t1 size // 2 ...)

Change the t1 size // 2 to ((t1 size / 2) rounded...).
Right click on the code and press Accept.
7. Shift click on the R again and choose 'save image for end user'.
8. Open up scratch again and tadaa!
OPTIONAL: CUSTOM BLOCK COLOURS
I don't know how to change tab colours, but I do know how to change the colours for the blocks inside.
1. Exit fill screen mode and open up the browser again.
2.Go into Scratch-Objects/ScriptableScratchMorph AND CLICK THE CLASS BUTTON/block specs/blockColorFor:
3.Scroll down and put this code after the sensing bit:

Code:

'(category name)' = t1 ifTrue: [^ Color
    h:0
    s:0
    v:0].

As usual, replace (category name) with your new category name and replace HSV with a HSV colour code.
Hope this helps  smile

It says:

only integers should be used as indices
UndefinedObject(Object)>>error:
UndefinedObject(Object)>>errorNonIntegerIndex
UndefinedObject(Object)>>at:put:
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:
TextMorphEditor(ParagraphEditor)>>evaluateSelection
[] in PluggableTextMorph>>doIt
[] in PluggableTextMorph>>handleEdit:
TextMorphForEditView(TextMorph)>>handleEdit:
PluggableTextMorph>>handleEdit:

Replace < with _

Offline

 

#58 2012-08-01 02:28:54

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

theamazingblob wrote:

Thanks, this works great!  I just have one question, how do I put blocks in the new category?

In the block specs, do this:

Code:

'yourcategoryname'

(make sure you put the ' too.)
... then put your block specs and they will appear in that category.

Last edited by nathanprocks (2012-08-01 02:30:42)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#59 2012-08-01 02:39:07

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

It would be great if you could have 2 scratch projects open in different tabs inside of one Scratch window  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#60 2012-08-01 02:50:46

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

jji7skyline wrote:

It would be great if you could have 2 scratch projects open in different tabs inside of one Scratch window  tongue

That is possible, but 2 projects running at once on the same thread would lag heaps.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#61 2012-09-17 14:10:32

connormonster1220
Scratcher
Registered: 2012-05-20
Posts: 10

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

This does not work.

Offline

 

#62 2012-12-08 23:52:26

WIlliam7777
Scratcher
Registered: 2012-07-21
Posts: 41

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

I got an error: message not understood: over

How can i fix this?

Last edited by WIlliam7777 (2012-12-08 23:52:49)

Offline

 

#63 2012-12-10 14:36:41

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Offline

 

#64 2013-01-02 19:09:17

sakafitrady
Scratcher
Registered: 2012-09-07
Posts: 100+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

just 1 question, how do you add blocks in your new category?

Offline

 

#65 2013-01-02 20:10:25

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

sakafitrady wrote:

just 1 question, how do you add blocks in your new category?

In your block specs, after the last block, add 'yourcategoryname' (with the single quotes) and add your blocks after it.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#66 2013-01-05 02:06:53

WIlliam7777
Scratcher
Registered: 2012-07-21
Posts: 41

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

Here it is,but I cannot help you by giving the category a new color.
Open scratch.While pressing shift,click the R at the scratch logo in the upper left.Click turn fill screen off.Middle click anywhere on scratch and click the red button that appeared.Click debug and inspect morph.
In the bottom pane of the inspect morph,type this code.Replace the (category) with your category name.

Code:
ScratchSkin at: #(category) put: (ScratchFrameMorph skinAt: #control).
ScratchSkin at: #(category)Over put: (ScratchFrameMorph skinAt: #controlOver).
ScratchSkin at: #(category)Pressed put: (ScratchFrameMorph skinAt: #controlPressed).

This code will allow you to add new category without getting a error.
Highlight all the text and press alt-d.

Now,Click on the white area.You will see a world menu.Click open and then,browser.

Go to Scratch-UI-Panes/ScratchViewerMorph/accessing/rebuildCategorySelectors.The 3rd line should look something like this:

t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables ).

Add your new category to the end, so it looks like this:

t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables #(new category) ).

Again,replace the (new category) with your category name.

If you need and odd number of categories, near the bottom there is code that says:

catButtonsExtent < 2 * t2 x + (3 * t9) @ (t1 size // 2 ..)

Change the t1 size // 2 to ((t1 size / 2) rounded...).
Right click on the code and press Accept.

Close the browser.

While pressing shift,click the R at the scratch logo in the upper left.Click turn fill screen on.Again,While pressing shift,click the R at the scratch logo in the upper left.Click save image for end-user.Confirm everything with yes.

Open scratch again.You will see a new category.It is the same color as the control category.

OPTIONAL: CUSTOM BLOCK COLOURS
I cannot help you with category colors,I do know how to change the colours for the blocks inside.
1. Exit fill screen mode and open up the browser again.
2.Go into Scratch-Objects/ScriptableScratchMorph AND CLICK THE CLASS BUTTON/block specs/blockColorFor:
3.Scroll down and put this code after the sensing bit:

'(category name)' = t1 ifTrue: [^ Color
    h:0
    s:0
    v:0].

As usual, replace (category name) with your new category name and replace HSV with a HSV colour code.

Hope this helps  smile

Offline

 

#67 2013-01-06 19:23:43

fetchydog567
Scratcher
Registered: 2011-12-28
Posts: 500+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

What is everybody saying? This worked for me!  smile


http://www.minecraftanonymous.com/assets/banners/banner_51.pngJust a reminder I won't be on Scratch that much but I 'll still be here, so if i'm on something, I will be commenting back, okay! wink , PICO Team!!!!!!!!!!! SCRATCH DEADW!!! PICO HACK ACCOUTNTT@@

Offline

 

#68 2013-02-03 09:01:34

yoland
Scratcher
Registered: 2011-09-23
Posts: 18

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

I want my own tab color so I changed controlPressed to my newtabPressed.
I also reloaded the scratch skin but all it says is Key not found!   yikes

Offline

 

#69 2013-04-17 21:20:29

mrsrec
Scratcher
Registered: 2010-11-14
Posts: 100+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

wordMan wrote:

Zenith2582 wrote:

AWESOME! I've been trying to figure out how to do this without the source code! Can you make a tutorial on how to change the image at the top left corner permanently?

You get out of full screen mode.  ALT click the image until it says Sketch under it. Click the pencil/pen gray button. Edit it. click okay. Save the scratch image. done! smile

Not Yet. If You Click (X) On ScratchFrameMorph Then Click Scractch Under The Open Menu, It Puts Up The Old Logo.


Scratchy Scratcher Scratched Scratch Scratches When He Scratchy Scratches Scratch Projects. These Scratch Projects Were Started From Scratch.
http://internetometer.com/image/37716.png

Offline

 

#70 2013-04-17 21:28:27

mrsrec
Scratcher
Registered: 2010-11-14
Posts: 100+

Re: GUIDE: MAKE NEW TABS IN SCRATCH (Please sticky)

theamazingblob wrote:

Thanks, this works great!  I just have one question, how do I put blocks in the new category?

Let's Say Your Category Is Named Amazingblob.

The Block Specs Look Like This:

Code:

| blockspecs |
blockspecs _ # ('motion' ('block' #- #beep) 'control' ('block' #- #beep) 'looks' ('block' #- #beep) 
'sensing' ('block' #- #beep) 'sound' ('block' #- #beep) 'operators' ('block' #- #beep) 'pen' ('block' #- #beep) 'variables' ('block' #- #beep) 'list' ('block' #- #beep) 'amazingblob' ('block' #- #beep))

^ blockspecs, self obsoleteBlockSpecs

I Haven't Tested It Yet, But It Should Work.


Scratchy Scratcher Scratched Scratch Scratches When He Scratchy Scratches Scratch Projects. These Scratch Projects Were Started From Scratch.
http://internetometer.com/image/37716.png

Offline

 

Board footer