Pages: 1
... in the same category? As an example, list blocks are in the variables category but are different colours from variable blocks.
Please answer, I want some 3D blocks in my still-under development modification to be different from the rest of the Motion blocks.
Or how do you use the ScratchSkin?
And where did the tutorials all go?
Last edited by rdococ (2012-02-14 08:39:33)
Offline
Nobody helps me here, do they?
Offline
Err, there's no "easy way out". I'll look into it, though.
Offline
I need it right now.
Offline
I can't find it, but you basically need to edit the stuff under scratch-objects > scriptablescratchmorph (class) > blockspecs > [color methods]
Last edited by Hardmath123 (2012-02-14 09:45:06)
Offline
I added the new colour to BlockColorsFor:, now how do I actually apply the change to the block?
Current code
t1 = 'space' ifTrue: [^ Color
h: 0
s: 0
v: 0.23].
Last edited by rdococ (2012-02-14 09:47:59)
Offline
rdococ wrote:
I added the new colour to BlockColorsFor:, now how do I actually apply the change to the block?
Current code
t1 = 'space' ifTrue: [^ Color
h: 0
s: 0
v: 0.23].
You also have the blockspec under a new category called 'space', right?
Offline
Hardmath123 wrote:
rdococ wrote:
I added the new colour to BlockColorsFor:, now how do I actually apply the change to the block?
Current code
t1 = 'space' ifTrue: [^ Color
h: 0
s: 0
v: 0.23].You also have the blockspec under a new category called 'space', right?
No--- I'll add that right now.
Doesn't work, it just removes the blocks from sight-- and I also made a global variable called 'SpaceBlockColor' instead to replace the actual color data (in order to make it as close as possible to 'ListBlockColor').
Last edited by rdococ (2012-02-14 10:07:12)
Offline
rdococ wrote:
Hardmath123 wrote:
rdococ wrote:
I added the new colour to BlockColorsFor:, now how do I actually apply the change to the block?
Current code
t1 = 'space' ifTrue: [^ Color
h: 0
s: 0
v: 0.23].You also have the blockspec under a new category called 'space', right?
No--- I'll add that right now.
Doesn't work, it just removes the blocks from sight-- and I also made a global variable called 'SpaceBlockColor' instead to replace the actual color data (in order to make it as close as possible to 'ListBlockColor').
You have to override the behavior in the main block-page-creating method in ScriptableScratchMorph's blocks category. Look at variablesPage for an idea of how to do this.
Offline
nXIII wrote:
rdococ wrote:
Hardmath123 wrote:
You also have the blockspec under a new category called 'space', right?
No--- I'll add that right now.
Doesn't work, it just removes the blocks from sight-- and I also made a global variable called 'SpaceBlockColor' instead to replace the actual color data (in order to make it as close as possible to 'ListBlockColor').You have to override the behavior in the main block-page-creating method in ScriptableScratchMorph's blocks category. Look at variablesPage for an idea of how to do this.
Where is it?
Oh, found it.
Can you give me an example code with 'space', no making or deleting buttons, just differently coloured blocks?
Oh, found it again. Do I make a category called space ops?
Wait--- this is too hard for me.
Last edited by rdococ (2012-02-15 08:45:50)
Offline
Pages: 1