markyparky56 wrote:
I think theres a method or something in squeak which allows you to stamp whole words, Bharvey talked about it a while back.
All I remember talking about is STAMP, with the words in a costume, but after a little poking around I found
Graphics-Primitives>Pen>Operations>print:withFont:
and I bet you could make a CYOB block using it.
Offline
sparks wrote:
ah, I tried
Code:
self print: t1 withFont: t2but to no avail!
Nice try...
@Bharvey Maybe I just read it wrong...
Offline
sparks wrote:
ah, I tried
Code:
self print: t1 withFont: t2but to no avail!
Were you talking to a pen? (I'm wondering about the "self" part.) This sort of works for me:
Pen new print: aString withFont: (ScratchFrameMorph getFont: #TalkBubble)
but you have to tweak some of the variables of the pen, and get it positioned right, etc.
Offline
sparks wrote:
...how?
yes, how do you get ultimate control!
Offline
(self ownerThatIsA: ScratchStageMorph) penTrailsForm
Let's see, here are some examples:
| stage form canvas | "Get the stage and pen trails Form." (stage := self ownerThatIsA: ScratchStageMorph) ifNotNil: [stage createOrResizeTrailsForm. form := stage penTrailsForm] ifNil: [^ self]. "Make a FormCanvas" canvas := FormCanvas on: form. "Rectangle" canvas fillRectangle: (0@0 extent: 480@180) color: Color black. "Text" canvas text: 'Hello, World!' at: 50@50 font: (ScratchFrameMorph getFont: #Arg) color: Color red. canvas text: 'Hello, World!' at: 20@30 font: (ScratchFrameMorph getFont: #DialogBoxTitle) color: Color white. "Ovals" canvas fillOval: (0@0 extent: 300@100) color: (Color green alpha: 0.4) borderWidth: 3 borderColor: Color green darker darker. canvas fillOval: (40@40 extent: 200@80) color: (TranslucentColor r: 0 g: 1 b: 1 alpha: 0.3). canvas fillOval: (100@20 extent: 200@140) color: (TranslucentColor r: 1 g: 1 b: 0 alpha: 0.5). "Update the stage, otherwise you won't see the pen marks" stage changed.
Last edited by nXIII (2010-08-07 18:34:42)
Offline
well I sucessfully turned all those into Panther custom blocks ^.^ nice stuff too, the text stamper is instantanious but there isn't a way to change font size. what we really need is a dropdown for the font or you have to remember the names and type them properly:)
the other problem is that the numbers for the position (0@0) in the block code puts the drawn shape/text at -240,180 rather than 0,0 so I can get it to correct the X position by doing (t1+240@t2) but if I try to correct the Y position (t1+240@t2-180) it does not work
Last edited by sparks (2010-08-08 13:59:11)
Offline
has anyone written a run command block? there is the CommandLineSocket thing, but I have no idea how to interface it.
Offline
paulpsicle wrote:
has anyone written a run command block? there is the CommandLineSocket thing, but I have no idea how to interface it.
Don't think so... It won't really be helpful untill we release 1.1 with the multi-line text inserters. (Or will it make no difference...?)
Offline
SeptimusHeap wrote:
I feel, well, not like a dev anymore
Can I be a 'sub-dev?'
Why do you want to be a sub-dev? and what does a sub-dev do?
Offline
SeptimusHeap wrote:
Sorry .
I never said you didn't do a big part to help this project.
I was joking
As in, you're the founder, I'm the programmer...
Oh, wait, I read your post wrong. *bangs head against desk* Really sorry...
You can be a dev again if you want, we don't care.
Last edited by nXIII (2010-08-10 19:55:57)
Offline
Oh, no! The Panther development thread actually fell to the second page!
Offline
ScratchReallyROCKS wrote:
Oh, no! The Panther development thread actually fell to the second page!
IT'S THE END OF THE WORLD!
Do you think panther might be losing popularity?
Offline
majormax wrote:
ScratchReallyROCKS wrote:
Oh, no! The Panther development thread actually fell to the second page!
IT'S THE END OF THE WORLD!
Do you think panther might be losing popularity?
I hope not!
Offline
sparks wrote:
yup, we need to release 1,1 but everyone on the team is on holiday (other than me, nXIII and MP56)
Yeah, you guys are falling behind! BYOB 3 is out and Panther is still stuck at 1.0.
Offline