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.
Offline
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
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.
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
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
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
Thanks, this works great! I just have one question, how do I put blocks in the new category?
Offline
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 helpsIt 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
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:
'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)
Offline
It would be great if you could have 2 scratch projects open in different tabs inside of one Scratch window
Offline
jji7skyline wrote:
It would be great if you could have 2 scratch projects open in different tabs inside of one Scratch window
That is possible, but 2 projects running at once on the same thread would lag heaps.
Offline
This does not work.
Offline
I got an error: message not understood: over
How can i fix this?
Last edited by WIlliam7777 (2012-12-08 23:52:49)
Offline
I get an error too, but it's a different error.
"Key Not Found"
Offline
just 1 question, how do you add blocks in your new category?
Offline
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.
Offline
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
Offline
What is everybody saying? This worked for me!
Offline
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!
Not Yet. If You Click (X) On ScratchFrameMorph Then Click Scractch Under The Open Menu, It Puts Up The Old Logo.
Offline
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:
| 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.
Offline