We probably do not need that anymore… HandMorph>>triggerHaloFor: aMorph after: timeOut "Trigger automatic halo after the given time out for some morph" self addAlarm: #spawnMagicHaloFor: with: aMorph after: timeOut
HandMorph>>spawnMagicHaloFor: aMorph (self halo notNil and:[self halo target == aMorph]) ifTrue:[^self]. aMorph addMagicHaloFor: self. Morph>>addMagicHaloFor: aHand | halo prospectiveHaloClass | aHand halo ifNotNil: [ aHand halo target == self ifTrue: [ ^ self ]. aHand halo isMagicHalo ifFalse: [ ^ self ] ]. prospectiveHaloClass := Smalltalk globals at: self haloClass ifAbsent: [ HaloMorph ]. halo := prospectiveHaloClass new. halo bounds: (halo worldBoundsForMorph: self). halo popUpMagicallyFor: self hand: aHand probably a christmas present :) We will have to remove it when we will undress the christmas tree. MagicHalo seems to be halo that smoothly vanish and appear. popUpFor: aMorph event: evt "This message is sent by morphs that explicitly request the halo on a button click. Note: anEvent is in aMorphs coordinate frame." | hand anEvent | self flag: #workAround. "We should really have some event/hand here..." anEvent := evt isNil ifTrue: [hand := aMorph world activeHand. hand ifNil: [hand := aMorph world primaryHand]. hand lastEvent transformedBy: (aMorph transformedFrom: nil)] ifFalse: [hand := evt hand. evt]. self target: aMorph. hand halo: self. hand world addMorphFront: self. positionOffset := anEvent position - (aMorph point: aMorph position in: owner). self startStepping. (self haloTransitions or: [self isMagicHalo]) ifTrue: [self magicAlpha: 0.0. self startSteppingSelector: #fadeInInitially] Stef