Posted by
commits-2 on
Apr 17, 2021; 5:09pm
URL: https://forum.world.st/The-Inbox-MorphicExtras-ct-295-mcz-tp5128802.html
A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-ct.295.mcz==================== Summary ====================
Name: MorphicExtras-ct.295
Author: ct
Time: 17 April 2021, 7:09:30.182932 pm
UUID: e1a46d30-9232-aa4e-a316-9aad80fa0978
Ancestors: MorphicExtras-eem.293
PianoKeyboardMorph: Don't play a sound when a menu is invoked.
=============== Diff against MorphicExtras-eem.293 ===============
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.
!