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:
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:
t1 < #(#motion #control #looks #sensing #sound #operators #pen #variables ).
Add your new category to the end, so it looks like
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:
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:
'(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
Offline
Nice, I haven't seen a really good guide on this before.
(oh and did you read the new idea the Scratch team had about sticky-ing? here it is)
Offline
Offline
ihaveamac wrote:
Tabs as in...
The categories....like Control, Motion, Sensing, etc.
Offline
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:)
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:) has turned into a smiley!
Last edited by nXIII (2010-07-11 10:03:40)
Offline
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
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 has turned into a smiley!
In all the other tab colour definitions, the format uses HSV...
Offline
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
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 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.
Offline
I got an error :
Message not understood: Over
Offline
Thank you. I have been looking everywhere for a way to make new categories and now I can.
<when green flag clicked>
<forever>
<say[ thank you ]>
<end>
Last edited by celloguy123 (2010-07-11 22:15:46)
Offline
Jwosty wrote:
Jakey22 wrote:
I got an error :
Message not understood: OverSame here... How can we define it?
Make sure that all your spaces are in the right place, instead of
ScratchSkin at: #Other put: (ScratchFrameMorph skinAt: #control). ScratchSkin at: #Other Over put: (ScratchFrameMorph skinAt: #controlOver). ScratchSkin at: #Other Pressed put: (ScratchFrameMorph skinAt: #controlPressed).
put
ScratchSkin at: #Other put: (ScratchFrameMorph skinAt: #control). ScratchSkin at: #OtherOver put: (ScratchFrameMorph skinAt: #controlOver). ScratchSkin at: #OtherPressed put: (ScratchFrameMorph skinAt: #controlPressed).
OtherOver must have no spaces, otherwise it will think Over is a message.
Last edited by scratchycat625625 (2010-07-14 10:57:07)
Offline
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.
Last edited by majormax (2010-07-22 08:19:08)
Offline
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?
Offline
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 just have to add your new image, then (If you're using normal Scratch) shift click where the 'R' would be and click 'Save image for end user,' or (If you're using the Source code) shift click 'file' then click 'save image for end user.'
Offline
"Highlight all the code, right click and press Do it."
I press do it and this thing comes up
"6. Go to Scratch-UI-Panes/ScratchViewerMorph/accessing/rebuildCategorySelectors."
I cant find "rebuildCaregorySelectors"
Offline
colorfusion wrote:
"Highlight all the code, right click and press Do it."
I press do it and this thing comes up
"6. Go to Scratch-UI-Panes/ScratchViewerMorph/accessing/rebuildCategorySelectors."
I cant find "rebuildCaregorySelectors"
In 1.4, rebuildCategorySelectors is in initialization, not accessing.
Offline
it doesn't work for me, it keeps saying things are undefined.
i'm using the scratch source code btw.
Offline
stickdude123 wrote:
this should be stickied
BOOP BOOP NECRO POST BOOP BOOP
And i dont think that...
And i dont think many people do..
Last edited by bbbeb (2010-11-05 00:27:07)
Offline
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!
Offline