I guess someone already asked this question somewhere in the forum, but I couldn't find it.
Could someone let me know all places in Scratch.image where I have to change something so that the color of the labels of Scratch blocks/categories will be black instead of white? I changed in "Blockmorph class initialize", but the labels are still white...
As a more general question (if you answer the first one ) could you please detail which steps did you follow in Squeak to find all the relevant portions of Squeak code that affect labels' color? Thanks in advance!!!
Offline
Sorry I can't really help you, But I Do know basic Color Codes... Such as, [/color=blue] Makes the Color Blue (No Forward slash) It Produces this Blue and that [/color] makes the color disappear again... I Also know that You can produce Red by doing this [/color=#FF0000] (Again No Slash for it to work) and that produces this Red and then you will need [/color] to close it off again but that is really all... Try putting those codes before and after the Scratchblocks... Good Luck anyway, You can find out more and some other useful information here
Offline
Joewheeeeler wrote:
Sorry I can't really help you, But I Do know basic Color Codes... Such as, [/color=blue] Makes the Color Blue (No Forward slash) It Produces this Blue and that [/color] makes the color disappear again... I Also know that You can produce Red by doing this [/color=#FF0000] (Again No Slash for it to work) and that produces this Red and then you will need [/color] to close it off again but that is really all... Try putting those codes before and after the Scratchblocks... Good Luck anyway, You can find out more and some other useful information here
![]()
S/He wants help in Squeak (what Scratch is written in), not BBCode. To the question, absolutely no idea.
Offline
fill-screen off; right-click repeatedly on the button tells me it's a ResizeableToggleButton2; click the spanner icon, "browse morph class"; looks like it's set at the end of the initialise method (I think?)
Hope that helps; I'm no expert Squeaker
I'm on a Mac; I don't know if right-clicking works on other platforms. Perhaps a modifier key such as alt?
Offline
I tried both in "resizibletogglebutton2 > initialization > initialize" and "scratchviewermorph > initialization > rebuildCategorySelectors" (I really need a tutorial on how to find what I'm looking for in Squeak... I keep getting confusing information and no search is able to show me what I need... really frustrating... I'm sure this is only due to the fact that I'm not a object-oriented guy so I really love Jens' javascript re-implementation of BYOB/Snap!
).
Anyway. All my attempts so far didn't give me black font. I could just get black labels for category buttons by direcly changing the labelColorOff/On/Over properties "by hand" in the Inspector. But, of course, this is not a stable fix...
Offline
roijac wrote:
beat that
http://i.imgur.com/oCDoz.png
Is that Photoshop'd, or are you going to tell us how you did it?
Offline
I believe that text is part of the skin. The simplest solution is to right-click repeatedly on it until it reads "StringMorph" in pink under the text, then select the RED circular button above it, and finally select "change color" or something.
Offline
In ScratchViewerMorph rebuildCategorySelectors, change this line:
setLabelColor: Color white;
ResizableToggleButton2 initialize:
labelColorOff _ Color
r: 78 / 255
g: 82 / 255
b: 82 / 255.
labelColorOn _ Color green.
labelColorOver _ labelColorOff
BlockMorph (class) initialize:
LabelColor _ Color white.
Open a transcript, then type this:
BlockMorph initialize
Highlight it all, then press Alt-D (or right-click then 'do it').
Click in the white space, choose open, then 'Scratch'.
Et voilà!
(Works for me, anyway...)
Offline
TheSuccessor wrote:
Et voilà!
Thanks a lot! It worked also for me. Almost. I got label and block categories black, except for values in menus (e.g. variable and message names) and labels of hatblocks. Do you know how to change also their colors?
And, last but very important, can you see where I had made a mistake? I had already made these changes:
- setLabelColor in rebuildCategorySelectors
- labelColorOff/On/Over in initialize of ResizableToggleButton2
I just missed LabelColor in initialize of BlockMorph, as I was concentrated for now on categories. So I had also missed to call BlockMorph initialize.
After that I saved the end-user image and restarted Scratch, missing the step in which you suggest to reopen Scratch. Was this the reason for the black labels not showing up? What does this step really do? Thanks in advance!
Offline
s_federici wrote:
What does this step really do?
It creates the Scratch window again from scratch (no pun intended), forcing the StringMorphs to be remade with the new colours. Otherwise, Scratch will just use the existing ones, which still have the old colours.
Offline
TheSuccessor wrote:
remade with the new colours
What you said suggested me a very drastic move: I changed the white color in the Color class to... black I think that it could work very well for me. The only problem is that even the arg backgrounds are black... I guess that moving the arg backgrounds back to white could be even more complex than just changing the color of the labels.
Offline
Ok! After having brought the white color in the Color class back to... white, I reduced the number of places where I still see white fonts:
- in Motion: "point towards" and "goto" menus
- in Control:
- "when [green flag] clicked" label
- items in "broadcast" and "when i receive" menus
- sprite name in "when sprite1 clicked" label
- In Sensors:
- items in "touching ?", "of Sprite1" and "distance from" menus
Any further suggestion?
Offline
s_federici wrote:
I changed the white color in the Color class to... black
![]()
That sounds like a really bad idea... Will that even change the paint editor, too?
Offline
blob8108 wrote:
Will that even change the paint editor, too?
Not completely. I found two black squares in the paint editor, but then, when I clicked on the white color (among the grays) it changed back to white. And I could draw white shapes.
Offline
Digging and digging and alt-clicking everything on the block palette, I made it in the end! Thanks a lot to TheSuccessor that paved the way to my (I know, small) success. If anyone is interested in the full list of methods to be changed, just ask
Offline