Etoys: Etoys-kfr.89.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys: Etoys-kfr.89.mcz

commits-2
Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.89.mcz

==================== Summary ====================

Name: Etoys-kfr.89
Author: kfr
Time: 28 August 2011, 7:06:13 pm
UUID: 65810e77-e7dc-7c46-9d16-1dedaa1754a3
Ancestors: Etoys-kfr.88

Revert some of the ViewerLine changes pickup and visual feedback changes .
http://tracker.squeakland.org/browse/SQ-972

=============== Diff against Etoys-kfr.88 ===============

Item was changed:
  ----- Method: CategoryViewer>>phraseForVariableFrom: (in category 'entries') -----
+ phraseForVariableFrom: aMethodInterface
+ | anArrow slotName getterButton aRow doc setter hotTileForSelf spacer |
+ Preferences universalTiles
+ ifTrue: [^ self universalTilesPhraseForVariableFrom: aMethodInterface].
+ aRow := ViewerLine newRow elementSymbol: (slotName := aMethodInterface selector);
+ wrapCentering: #center;
+ cellPositioning: #leftCenter.
- phraseForVariableFrom: aMethodInterface
- "Return a structure consisting of tiles and controls and a readout representing a 'variable' belonging to the player, complete with an appropriate readout when indicated. Slightly misnamed in that this path is used for any methodInterface that indicates an interesting resultType."
-
- | anArrow slotName getterButton aRow doc setter hotTileForSelf spacer readOut aTileToRefer |
- Preferences universalTiles ifTrue: [^ self universalTilesPhraseForVariableFrom: aMethodInterface].
-
- aRow _ ViewerLine newRow
- elementSymbol: (slotName _ aMethodInterface selector);
- wrapCentering: #center;
- cellPositioning: #leftCenter.
-
  (self wantsInfoButtonFor: slotName)
+ ifTrue: [aRow
+ addMorphBack: (self infoButtonFor: slotName)]
+ ifFalse: [aRow addMorphBack: ScriptingSystem buttonSpacer].
- ifFalse:
- [aRow addMorphBack: ScriptingSystem buttonSpacer]
- ifTrue:
- [aRow addMorphBack: (self infoButtonFor: slotName)].
-
  aRow addMorphBack: self spacerAfterButton.
+ hotTileForSelf := self tileForSelf bePossessive.
+ hotTileForSelf
+ on: #mouseDown
+ send: #makeGetter:event:from:
-
- hotTileForSelf _ self tileForSelf bePossessive.
- hotTileForSelf  on: #mouseDown send: #makeGetter:event:from:
  to: self
  withValue: (Array with: aMethodInterface selector with: aMethodInterface resultType).
  aRow addMorphBack: hotTileForSelf.
+ aRow addMorphBack: (spacer := Morph new color: self color;
+ extent: 0 @ 0).
+ spacer
+ on: #mouseEnter
+ send: #addGetterFeedback
+ to: aRow.
+ spacer
+ on: #mouseLeave
+ send: #removeHighlightFeedback
+ to: aRow.
+ spacer
+ on: #mouseLeaveDragging
+ send: #removeHighlightFeedback
+ to: aRow.
+ spacer
+ on: #mouseDown
+ send: #makeGetter:event:from:
-
- aRow addMorphBack: (spacer _ Morph new color: self color; extent: 0@0).
- spacer on: #mouseEnter send: #addGetterFeedback to: aRow.
- spacer on: #mouseLeave send: #removeHighlightFeedback to: aRow.
- spacer on: #mouseLeaveDragging send: #removeHighlightFeedback to: aRow.
- spacer  on: #mouseDown send: #makeGetter:event:from:
  to: self
  withValue: (Array with: aMethodInterface selector with: aMethodInterface resultType).
+ hotTileForSelf
+ on: #mouseEnter
+ send: #addGetterFeedback
+ to: aRow.
+ hotTileForSelf
+ on: #mouseLeave
+ send: #removeHighlightFeedback
+ to: aRow.
+ hotTileForSelf
+ on: #mouseLeaveDragging
+ send: #removeHighlightFeedback
+ to: aRow.
+ getterButton := self getterButtonFor: aMethodInterface selector type: aMethodInterface resultType.
- hotTileForSelf on: #mouseEnter send: #addGetterFeedback to: aRow.
- hotTileForSelf on: #mouseLeave send: #removeHighlightFeedback to: aRow.
- hotTileForSelf on: #mouseLeaveDragging send: #removeHighlightFeedback to: aRow.
-
- getterButton _ self getterButtonFor: aMethodInterface selector type: aMethodInterface resultType.
  aRow addMorphBack: getterButton.
+ getterButton
+ on: #mouseEnter
+ send: #addGetterFeedback
+ to: aRow.
+ getterButton
+ on: #mouseLeave
+ send: #removeHighlightFeedback
+ to: aRow.
+ getterButton
+ on: #mouseLeaveDragging
+ send: #removeHighlightFeedback
+ to: aRow.
+ (doc := aMethodInterface documentation)
+ ifNotNil: [getterButton setBalloonText: doc].
+ slotName == #seesColor:
+ ifTrue: [self addIsOverColorDetailTo: aRow.
+ ^ aRow].
+ slotName == #color:sees:
+ ifTrue: [self addColorSeesDetailTo: aRow.
+ ^ aRow].
+ (#(#touchesA: #overlaps: #overlapsAny: #distanceToPlayer: #bearingTo: #bearingFrom: ) includes: slotName)
+ ifTrue: [self addPlayerArgumentTo: aRow.
+ ^ aRow].
- getterButton on: #mouseEnter send: #addGetterFeedback to: aRow.
- getterButton on: #mouseLeave send: #removeHighlightFeedback to: aRow.
- getterButton on: #mouseLeaveDragging send: #removeHighlightFeedback to: aRow.
- (doc _ aMethodInterface documentation) ifNotNil:
- [getterButton setBalloonText: doc].
-
- (slotName == #seesColor:) ifTrue:
- [self addIsOverColorDetailTo: aRow.
- ^ aRow].
-
- (slotName == #color:sees:) ifTrue:
- [self addColorSeesDetailTo: aRow.
- ^ aRow].
-
- (#(touchesA: overlaps: overlapsAny: distanceToPlayer: bearingTo: bearingFrom:) includes: slotName) ifTrue:
- [aRow addMorphBack: (Morph new extent: 0@0).  "spacer (Is this spacer really needed??? - takashi)"
- aTileToRefer :=  self presenter standardPlayer tileToRefer.
- aTileToRefer on: #mouseEnter send: #addGetterFeedback to: aRow.
- aTileToRefer on: #mouseLeave send: #removeHighlightFeedback to: aRow.
- aTileToRefer on: #mouseLeaveDragging send: #removeHighlightFeedback to: aRow.
- aTileToRefer on: #mouseDown send: #makeGetter:event:from:
- to: self
- withValue: (Array with: aMethodInterface selector with: aMethodInterface resultType).
- aRow addMorphBack: aTileToRefer .
- aRow addMorphBack: (AlignmentMorph new beTransparent).  "flexible spacer"
- ^ aRow].
-
  aRow addMorphBack: VariableSpacer new.
+ (setter := aMethodInterface companionSetterSelector)
+ ifNotNil: [aRow addMorphBack: (Morph new color: self color;
+ extent: 2 @ 10).
+ anArrow := self
+ arrowSetterButton: #makeSetter:from:forPart:
- (setter _ aMethodInterface companionSetterSelector) ifNotNil:
- [aRow addMorphBack: (Morph new color: self color; extent: 2@10).  " spacer"
- anArrow _ self arrowSetterButton: #makeSetter:from:forPart:
  args: (Array with: slotName with: aMethodInterface resultType).
+ anArrow beTransparent.
+ anArrow
+ on: #mouseEnter
+ send: #addSetterFeedback
+ to: aRow.
+ anArrow
+ on: #mouseLeave
+ send: #removeHighlightFeedback
+ to: aRow.
+ anArrow
+ on: #mouseLeaveDragging
+ send: #removeHighlightFeedback
+ to: aRow.
+ aRow addMorphBack: anArrow].
+ (#(#color:sees: #copy #touchesA: #overlaps: #overlapsAny: #getTurtleAt: #getTurtleOf: ) includes: slotName)
+ ifFalse: [aMethodInterface wantsReadoutInViewer
+ ifTrue: [aRow
+ addMorphBack: (self
+ readoutFor: slotName
+ type: aMethodInterface resultType
+ readOnly: setter isNil
+ getSelector: aMethodInterface selector
+ putSelector: setter)]].
+ anArrow
+ ifNotNil: [anArrow step].
- anArrow beTransparent.
- anArrow on: #mouseEnter send: #addSetterFeedback to: aRow.
- anArrow on: #mouseLeave send: #removeHighlightFeedback to: aRow.
- anArrow on: #mouseLeaveDragging send: #removeHighlightFeedback to: aRow.
- aRow addMorphBack: anArrow].
-
- (#(color:sees: copy touchesA: overlaps: overlapsAny: getTurtleAt: getTurtleOf:) includes: slotName) ifFalse:
-   [aMethodInterface wantsReadoutInViewer ifTrue:
- [readOut := (self readoutFor: slotName type: aMethodInterface resultType readOnly: setter isNil getSelector: aMethodInterface selector putSelector: setter).
- readOut on: #mouseEnter send: #addSetterFeedback to: aRow.
- readOut on: #mouseLeave send: #removeHighlightFeedback to: aRow.
- readOut on: #mouseLeaveDragging send: #removeHighlightFeedback to: aRow.
- readOut on: #mouseDown send: #makeGetter:event:from:
- to: self
- withValue: (Array with: aMethodInterface selector with: aMethodInterface resultType).
- aRow addMorphBack: readOut.]].
- anArrow ifNotNil: [anArrow step].
  ^ aRow!

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev