[etoys-dev] Etoys Inbox: MorphicExtras-wiz.11.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Aug 10 02:37:00 EDT 2010
A new version of MorphicExtras was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/MorphicExtras-wiz.11.mcz
==================== Summary ====================
Name: MorphicExtras-wiz.11
Author: wiz
Time: 10 August 2010, 2:36:12 am
UUID: 9a64669a-54d6-4e4e-a239-92ec3a323307
Ancestors: MorphicExtras-RIF.10
Targeting changes third part.
This patches the classes SimpleSliderMorph and StringButtonMorph. The std changes to setTarget: method. The update of the addMenuItems: toHand: method.
See the comments in Morphc-wiz.31.mcz
Full text of changeset preamble:
"Change Set: targetOffsetFixes-wiz
Date: 5 June 2007
Author: (wiz) Jerome Peace
wiz 6/6/2007 23:41 6/6/2007 23:41
filed in the button and menu targetsighting fixes.
This stuff needs to be checked and fleshed out.
Todo: #sightWorldTargets: has no senders yet it is very important. (and possibly should replace #sightTargets:).
Check to see if Morph level #target: backup is in place.
wiz 6/5/2007 22:44
added fix for tilted target.
wiz 6/5/2007 21:15
added target cursor in targeting
wiz 6/5/2007 20:53
adjusted #setTarget: to refer to evt targetPoint instead of evt hand targetPoint.
wiz 6/5/2007 20:48
added target cursor to cursor class.
added Point class>>fromUserWithCursor:
wiz 6/5/2007 20:22
Compilation of fixes for 3.8 (as of update 0556)
This first is just the fixes from the changeset below. Mostly changes targetOffset (when misused) to targetPoint.
Change Set: TargetOffsetFix-wiz
Date: 4 December 2006
Author: (wiz) Jerome Peace
wiz 12/4/2006 00:43
Second fix up the offending senders.
wiz 12/4/2006 00:12
Start repairs for targetOffset misuse.
Mantis #5567.
First add targetPoint to HandMorph.
"
=============== Diff against MorphicExtras-RIF.10 ===============
Item was added:
+ ----- Method: SimpleSliderMorph>>addSliderMenuItems:hand: (in category 'menu') -----
+ addSliderMenuItems: aCustomMenu hand: aHandMorph
+ "Add items to set slider parameters"
+ aCustomMenu addLine.
+ ""
+ aCustomMenu add: 'set action selector' translated action: #setActionSelector.
+ aCustomMenu add: 'change arguments' translated action: #setArguments.
+ ""
+ aCustomMenu add: 'set minimum value' translated action: #setMinVal.
+ aCustomMenu add: 'set maximum value' translated action: #setMaxVal.
+ ""
+ aCustomMenu addUpdating: #descendingString action: #toggleDescending.
+ aCustomMenu addUpdating: #truncateString action: #toggleTruncate.
+ !
Item was changed:
----- Method: SimpleSliderMorph>>setTarget: (in category 'menu') -----
setTarget: evt
| rootMorphs |
+ rootMorphs _ self world rootMorphsAt: evt targetPoint.
- rootMorphs _ self world rootMorphsAt: evt hand targetOffset.
target _ rootMorphs size > 1
ifTrue: [rootMorphs second]!
Item was added:
+ ----- Method: SimpleSliderMorph>>addTargetingMenuItems:hand: (in category 'menu') -----
+ addTargetingMenuItems: aCustomMenu hand: aHandMorph
+ "Add targeting menu items"
+ aCustomMenu addLine.
+
+ aCustomMenu add: 'set target' translated action: #targetWith:.
+ aCustomMenu add: 'sight target' translated action: #sightTargets:.
+ target
+ ifNotNil: [aCustomMenu add: 'clear target' translated action: #clearTarget]!
Item was added:
+ ----- Method: StringButtonMorph>>clearTarget (in category 'menu') -----
+ clearTarget
+
+ target _ nil.
+ !
Item was changed:
----- Method: SimpleSliderMorph>>addCustomMenuItems:hand: (in category 'menu') -----
addCustomMenuItems: aCustomMenu hand: aHandMorph
+ "To all the other Custom menu items add slider and targeting items."
-
super addCustomMenuItems: aCustomMenu hand: aHandMorph.
+ self addSliderMenuItems: aCustomMenu hand: aHandMorph .
+ self addTargetingMenuItems: aCustomMenu hand: aHandMorph .!
- aCustomMenu addLine.
- aCustomMenu add: 'set action selector' translated action: #setActionSelector.
- aCustomMenu add: 'change arguments' translated action: #setArguments.
- aCustomMenu add: 'set minimum value' translated action: #setMinVal.
- aCustomMenu add: 'set maximum value' translated action: #setMaxVal.
- aCustomMenu addUpdating: #descendingString action: #toggleDescending.
- aCustomMenu addUpdating: #truncateString action: #toggleTruncate.
- ((self pasteUpMorph rootMorphsAt: aHandMorph targetOffset) size > 1) ifTrue: [
- aCustomMenu add: 'set target' translated action: #setTarget:].
- target ifNotNil: [
- aCustomMenu add: 'clear target' translated action: #clearTarget].
- !
Item was changed:
----- Method: StringButtonMorph>>setTarget: (in category 'menu') -----
setTarget: evt
| rootMorphs |
+ rootMorphs _ self world rootMorphsAt: evt targetPoint.
- rootMorphs _ self world rootMorphsAt: evt hand targetOffset.
target _ rootMorphs size > 1
ifTrue: [rootMorphs second]
ifFalse: [nil]!
Item was added:
+ ----- Method: StringButtonMorph>>addTargetingMenuItems:hand: (in category 'menu') -----
+ addTargetingMenuItems: aCustomMenu hand: aHandMorph
+ "Add targeting menu items"
+ aCustomMenu addLine.
+
+ aCustomMenu add: 'set target' translated action: #targetWith:.
+ aCustomMenu add: 'sight target' translated action: #sightTargets:.
+ target
+ ifNotNil: [aCustomMenu add: 'clear target' translated action: #clearTarget]!
Item was changed:
----- Method: StringButtonMorph>>addCustomMenuItems:hand: (in category 'menu') -----
addCustomMenuItems: aCustomMenu hand: aHandMorph
super addCustomMenuItems: aCustomMenu hand: aHandMorph.
aCustomMenu add: 'change label' translated action: #setLabel.
aCustomMenu add: 'change action selector' translated action: #setActionSelector.
aCustomMenu add: 'change arguments' translated action: #setArguments.
aCustomMenu add: 'change when to act' translated action: #setActWhen.
+ self addTargetingMenuItems: aCustomMenu hand: aHandMorph .!
- ((self world rootMorphsAt: aHandMorph targetOffset) size > 1) ifTrue: [
- aCustomMenu add: 'set target' translated action: #setTarget:].
- !
More information about the etoys-dev
mailing list