Can I change the pick up a morph so that it doesn't have a shadow? I tried in the morph menu to drop shadow: show shadow, but this doesn't work. It doesn't affect the morph whether the show shadow is checked or not.
dhs
On Sunday 20 May 2007 10:07 pm, David H. Shanabrook wrote:
Can I change the pick up a morph so that it doesn't have a shadow? I tried in the morph menu to drop shadow: show shadow, but this doesn't work. It doesn't affect the morph whether the show shadow is checked or not.
Which version is your image? For drop shadow to be visible, make sure the drop shadow color is different from the background and the offset is non-zero.
The drop shadow (in halo menu) is different from the temporary shadow that appears when you 'pick' the morph.
Regards .. Subbu
Subbu
It is the temporary shadow that appears when I pick the morph that I want to eliminate. I am using 3.9 although I can switch to an older version if it would help.
dhs
On 20 May 2007, at 13:23, subbukk wrote:
On Sunday 20 May 2007 10:07 pm, David H. Shanabrook wrote:
Can I change the pick up a morph so that it doesn't have a shadow? I tried in the morph menu to drop shadow: show shadow, but this doesn't work. It doesn't affect the morph whether the show shadow is checked or not.
Which version is your image? For drop shadow to be visible, make sure the drop shadow color is different from the background and the offset is non- zero.
The drop shadow (in halo menu) is different from the temporary shadow that appears when you 'pick' the morph.
Regards .. Subbu _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
On Sunday 20 May 2007 11:08 pm, David H. Shanabrook wrote:
Subbu
It is the temporary shadow that appears when I pick the morph that I want to eliminate. I am using 3.9 although I can switch to an older version if it would help.
You can't control this from the halo menu. It is a built-in behavior for all Morphs. I am not aware of any preference setting to eliminate this pick up shadow. You will have to patch the Morph classes to eliminate it.
Sorry .. Subbu
The Hand draws a shadow of all morphs it is holding. You could implement the dragging of your morphs yourself and not leave that to HandMorph. Or hack HandMorph>>fullDrawOn: method to not draw the shadow (possibly in a subclass).
May I ask what you need this for?
- Bert -
On May 20, 2007, at 19:38 , David H. Shanabrook wrote:
Subbu
It is the temporary shadow that appears when I pick the morph that I want to eliminate. I am using 3.9 although I can switch to an older version if it would help.
dhs
On 20 May 2007, at 13:23, subbukk wrote:
On Sunday 20 May 2007 10:07 pm, David H. Shanabrook wrote:
Can I change the pick up a morph so that it doesn't have a shadow? I tried in the morph menu to drop shadow: show shadow, but this doesn't work. It doesn't affect the morph whether the show shadow is checked or not.
Which version is your image? For drop shadow to be visible, make sure the drop shadow color is different from the background and the offset is non-zero.
The drop shadow (in halo menu) is different from the temporary shadow that appears when you 'pick' the morph.
Regards .. Subbu
I am experimenting with geometry tutors, such as pentominos. when trying to fit shapes precisely together the shadow is very disturbing, it is hard to know what is the shadow and what is the shape, especially for kids.
dhs
On 20 May 2007, at 14:51, Bert Freudenberg wrote:
The Hand draws a shadow of all morphs it is holding. You could implement the dragging of your morphs yourself and not leave that to HandMorph. Or hack HandMorph>>fullDrawOn: method to not draw the shadow (possibly in a subclass).
May I ask what you need this for?
- Bert -
On May 20, 2007, at 19:38 , David H. Shanabrook wrote:
Subbu
It is the temporary shadow that appears when I pick the morph that I want to eliminate. I am using 3.9 although I can switch to an older version if it would help.
dhs
On 20 May 2007, at 13:23, subbukk wrote:
On Sunday 20 May 2007 10:07 pm, David H. Shanabrook wrote:
Can I change the pick up a morph so that it doesn't have a shadow? I tried in the morph menu to drop shadow: show shadow, but this doesn't work. It doesn't affect the morph whether the show shadow is checked or not.
Which version is your image? For drop shadow to be visible, make sure the drop shadow color is different from the background and the offset is non-zero.
The drop shadow (in halo menu) is different from the temporary shadow that appears when you 'pick' the morph.
Regards .. Subbu
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
In that case it's surely simplest to add the mouse handling to your pentomino tiles.
- Bert -
On May 20, 2007, at 21:01 , David H. Shanabrook wrote:
I am experimenting with geometry tutors, such as pentominos. when trying to fit shapes precisely together the shadow is very disturbing, it is hard to know what is the shadow and what is the shape, especially for kids.
dhs
On 20 May 2007, at 14:51, Bert Freudenberg wrote:
The Hand draws a shadow of all morphs it is holding. You could implement the dragging of your morphs yourself and not leave that to HandMorph. Or hack HandMorph>>fullDrawOn: method to not draw the shadow (possibly in a subclass).
May I ask what you need this for?
- Bert -
On May 20, 2007, at 19:38 , David H. Shanabrook wrote:
Subbu
It is the temporary shadow that appears when I pick the morph that I want to eliminate. I am using 3.9 although I can switch to an older version if it would help.
dhs
On 20 May 2007, at 13:23, subbukk wrote:
On Sunday 20 May 2007 10:07 pm, David H. Shanabrook wrote:
Can I change the pick up a morph so that it doesn't have a shadow? I tried in the morph menu to drop shadow: show shadow, but this doesn't work. It doesn't affect the morph whether the show shadow is checked or not.
Which version is your image? For drop shadow to be visible, make sure the drop shadow color is different from the background and the offset is non-zero.
The drop shadow (in halo menu) is different from the temporary shadow that appears when you 'pick' the morph.
Regards .. Subbu
On May 20, 2007, at 3:01 PM, David H. Shanabrook wrote:
I am experimenting with geometry tutors, such as pentominos. when trying to fit shapes precisely together the shadow is very disturbing, it is hard to know what is the shadow and what is the shape, especially for kids.
When I want to remove the drag-shadow from Morphs, I often use something like the following methods (implemented on my Morph subclass):
fullDrawOn: aCanvas
aCanvas isShadowDrawing ifTrue: [^ self]. super fullDrawOn: aCanvas. #fullDrawOn: is sent to a Morph to ask it to draw itself, its border, and its submorphs. The Hand uses it to draw a shadow copy of the Morph. This method says, if that's what's going on, don't draw anything (therefore preventing any shadow from being shown).
wantsToBeCachedByHand
^ false
This message is also sent during shadow drawing. It seems to be necessary to prevent shadows from being drawn, but I'm afraid I have forgotten why! and I'm not sure I have a chance to track it down right now. (I almost held off from posting this because of that, but I thought it would be better to offer the advice and leave an exercise for the reader. :)
Note that the shadow does serve at least one important purpose. In the default mouse handling, clicking on a Morph picks it up, and one must click the mouse again to drop the Morph. It can be confusing to have a Morph "stuck" to the hand without any visual indication.
I often make a simple mouse override to fix this too, if I am not doing any more specialized mouse handling on my own. Here is what I do:
handlesMouseDown: evt
^ true
This tells Morphic that a particular Morph wants to receive mouse events.
mouseDown: evt
evt hand waitForClicksOrDrag: self event: evt selectors: #( #click: #doubleClick: #doubleClickTimeout: #startDrag:) threshold: 0
This message is sent on mouse down. The method here tells the Hand to parse upcoming mouse events, and decide whether a click, double click, or drag might be happening. The threshold of "0" says to interpret any mouse movement at all as a drag. (There is a simpler variant of #waitForClicksOrDrag... that defaults that to 10, which I find to be too unresponsive.)
startDrag: evt
evt hand grabMorph: self.
This is called when the Hand detects a drag, after the "wait" message from above. The method just tells the hand to pick up this Morph.
Of course I'm sure there must be some flag that does the same thing! ;) If I am writing a system with many Morphs like this, I of course put all of this code in a superclass to avoid clutter.
Hope this helps, Benjamin Schroeder
beginners@lists.squeakfoundation.org