Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.254.mcz ==================== Summary ==================== Name: EToys-tfel.254 Author: tfel Time: 26 September 2016, 3:08:19.655594 pm UUID: d6ca728e-ca89-5043-a50c-d8a505760da6 Ancestors: EToys-tfel.253 fix the mouse over highlights for tiles in the viewer =============== Diff against EToys-tfel.253 =============== Item was added: + ----- Method: PhraseTileMorph>>handlesMouseOver: (in category 'event handling') ----- + handlesMouseOver: evt + + ^ true + ! Item was added: + ----- Method: PhraseTileMorph>>mouseEnter: (in category 'event handling') ----- + mouseEnter: evt + + self removeHighlightFeedback. + self addCommandFeedback: evt. + ! Item was added: + ----- Method: PhraseTileMorph>>mouseLeave: (in category 'event handling') ----- + mouseLeave: evt + "Resume drop-tracking in enclosing editor" + | ed | + self removeHighlightFeedback. + (ed := self enclosingTestTile) ifNotNil: [ed mouseEnter: evt].! Item was changed: ----- Method: ViewerLine>>addGetterFeedback (in category 'slot') ----- addGetterFeedback "Add feedback during mouseover of a getter" + | aMorph | + aMorph := RectangleMorph new + bounds: (self firstTileMorph topLeft corner: + (self firstAlignmentMorph ifNil: [self submorphs last bottomRight] ifNotNil: [:m | m bottomLeft])). - | aMorph endMorph | - - endMorph _ - (#(touchesA: #seesColor: #overlaps: color:sees: overlapsAny: bearingTo: bearingFrom: distanceToPlayer:) includes: self elementSymbol) - ifTrue: - [submorphs seventh] - ifFalse: - [submorphs fifth]. - aMorph := RectangleMorph new bounds: ((submorphs third topLeft - (2@1)) corner: ((endMorph right @ submorphs third bottom) + (2@1))). aMorph beTransparent; borderWidth: 2; borderColor: ScriptingSystem getterFeedback; lock. ActiveWorld addHighlightMorph: aMorph for: nil. " Color fromUser (Color r: 1.0 g: 0.355 b: 0.839) "! Item was changed: ----- Method: ViewerLine>>addSetterFeedback (in category 'slot') ----- addSetterFeedback "Add screen feedback showing what would be torn off to make a setter" | aMorph | + aMorph := RectangleMorph new bounds: (self firstTileMorph topLeft corner: self bounds bottomRight). - aMorph := RectangleMorph new bounds: ((submorphs third topLeft - (2@1)) corner: ((submorphs last right @ submorphs third bottom) + (2@1))). aMorph beTransparent; borderWidth: 2; borderColor: ScriptingSystem setterFeedback; lock. ActiveWorld addHighlightMorph: aMorph for: nil! Item was added: + ----- Method: ViewerLine>>firstAlignmentMorph (in category 'slot') ----- + firstAlignmentMorph + + ^ self submorphs reverse detect: [:m | m isAlignmentMorph] ifNone: []! Item was added: + ----- Method: ViewerLine>>firstTileMorph (in category 'slot') ----- + firstTileMorph + + ^ self submorphs detect: [:m | m isTileMorph]! |
Free forum by Nabble | Edit this page |