Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.300.mcz
==================== Summary ====================
Name: MorphicExtras-mt.300 Author: mt Time: 7 October 2021, 4:39:47.760277 pm UUID: 4bc12538-f6c7-3c40-af48-9d04c8993e16 Ancestors: MorphicExtras-ct.294, MorphicExtras-ct.295, MorphicExtras-ct.299
Merge. Merge. Merge. - Make proper use of DisplayScreen >>#restoreAfter: in SketchMorph examples. - PianoKeyboardMorph: Don't play a sound when a menu is invoked. - Adds FrameRateMorph to the 'Tools' category of the parts bin. I seriously use this morph for performance measuring.
=============== Diff against MorphicExtras-eem.293 ===============
Item was changed: ----- Method: FrameRateMorph class>>descriptionForPartsBin (in category 'parts bin') ----- descriptionForPartsBin ^ self partName: 'FrameRate' translatedNoop + categories: {'Just for Fun' translatedNoop. 'Tools' translatedNoop} - categories: {'Just for Fun' translatedNoop} documentation: 'A readout that allows you to monitor the frame rate of your system' translatedNoop!
Item was added: + ----- Method: MovingEyeMorph class>>extraExampleSqueakGhostIsWatchingYou (in category 'examples') ----- + extraExampleSqueakGhostIsWatchingYou + "MovingEyeMorph extraExampleSqueakGhostIsWatchingYou openInHand" + + | logoMorph leftEye rightEye | + logoMorph := (Form squeakLogo collectColors: #negated) asMorph. + leftEye := (self color: Color white irisColor: Color black) + extent: logoMorph extent * (0.1 @ 0.15); + center: (logoMorph pointAtFraction: 0.39 @ 0.55); + yourself. + rightEye := (self color: Color white irisColor: Color black) + extent: logoMorph extent * (0.1 @ 0.15); + center: (logoMorph pointAtFraction: 0.59 @ 0.56); + yourself. + logoMorph addAllMorphs: {leftEye. rightEye}. + ^ logoMorph.!
Item was changed: ----- Method: PianoKeyboardMorph>>mouseDownPitch:event:noteMorph: (in category 'simple keyboard') ----- mouseDownPitch: midiKey event: event noteMorph: noteMorph | pitch | + event redButtonPressed ifFalse: [^ self]. event hand hasSubmorphs ifTrue: [^ self "no response if drag something over me"]. event hand mouseFocus ifNil: ["If dragged into me, then establish focus so I'll see moves" event hand newMouseFocus: noteMorph event: event]. noteMorph color: playingKeyColor. pitch := AbstractSound pitchForMIDIKey: midiKey + 23. soundPlaying ifNotNil: [soundPlaying stopGracefully]. soundPlaying := soundPrototype soundForPitch: pitch dur: 100.0 loudness: 0.3. SoundPlayer resumePlaying: soundPlaying quickStart: true. !
Item was changed: ----- Method: PostscriptCanvas>>image:at:sourceRect:rule: (in category 'private') ----- image: form at: aPoint sourceRect: sourceRect rule: rule | aForm | self preserveStateDuring: [:inner | inner translate: aPoint + self origin. aForm := form depth <= 8 ifTrue: [form asFormOfDepth: 32] ifFalse: [form]. target write: ((aForm colorsUsed includes: Color transparent) ifTrue: [| top f2 c2 offset | "tfel: This was taken from SketchMorph, but is actually needed for all forms that use transparency" + offset := currentTransformation ifNil: [0@0] ifNotNil: [:t | t offset]. - offset := currentTransformation ifNil: [0@0] ifNotNilDo: [:t | t offset]. top := self topLevelMorph. f2 := Form extent: aForm extent depth: self depth. c2 := f2 getCanvas. c2 fillColor: Color white. c2 translateBy: offset - self origin - aPoint clippingTo: f2 boundingBox during: [:c | top fullDrawOn: c]. f2] ifFalse: [aForm])]. !
Item was changed: ----- Method: SketchMorph class>>extraExampleCook (in category '*MorphicExtras-examples') ----- extraExampleCook "SketchMorph extraExampleCook openInWorld"
^ (self withForm: Form extraCook) + addMouseUpActionWith: 'Display restoreAfter: [Form toothpaste: 30]'; - addMouseUpActionWith: 'Form toothpaste: 30'; balloonText: 'Click me and then drag the cursor over the screen'; yourself!
Item was changed: ----- Method: SketchMorph class>>extraExampleWizard (in category '*MorphicExtras-examples') ----- extraExampleWizard "SketchMorph extraExampleWizard openInWorld"
^ (self withForm: Form extraWizard) addMouseUpActionWith: + (MessageSend receiver: Display selector: #restoreAfter: argument: [Pen new web]); - (MessageSend receiver: Pen new selector: #web); balloonText: 'Click me and then drag the cursor over the screen(Trust me, I won''t turn you into a toad!!)' withCRs; yourself!
Item was added: + ----- Method: StringButtonMorph>>isButton (in category 'classification') ----- + isButton + + ^ true!
Item was changed: ----- Method: Workspace class>>extraExampleContents2 (in category '*MorphicExtras-examples') ----- extraExampleContents2 "This is example code for #extraExample2"
"Inspect any (sub)expression result by pressing <cmd>i" (20 to: 40 by: 2) asOrderedCollection addFirst: 16; addLast: 42; sort: [:x | x \ 3] descending; yourself.
"Explore any (sub)expression result by pressing <cmd>I" Project current world.
"Debug any (sub)expression using <cmd>D" (1 to: 9) join asNumber sqrt truncateTo: 1e-3. + (SystemWindow windowsIn: self currentWorld) - (SystemWindow windowsIn: ActiveWorld) select: [:window | window bounds isWide] thenDo: [:window | window color: window color negated].!
packages@lists.squeakfoundation.org