A new version of Sugar was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Sugar-kfr.18.mcz==================== Summary ====================
Name: Sugar-kfr.18
Author: kfr
Time: 20 February 2012, 9:20:04 pm
UUID: 0142062b-8ccb-064b-b308-b4cf0ae4c0b5
Ancestors: Sugar-kfr.17
Fixing mouse behaviour
=============== Diff against Sugar-kfr.17 ===============
Item was changed:
----- Method: SugarNavigatorBar>>soundVolume (in category 'buttons creation') -----
soundVolume
+ | bar slider r p |
- | bar slider |
bar := SimpleSliderMorph new.
bar position: ActiveHand position.
bar borderColor: Color black; borderWidth: 2.
bar width:25.
+ bar adjustToValue: SoundPlayer soundVolume average.
- bar adjustToValue: SoundPlayer soundVolume first."array with stereo values. pick first"
bar descending: true.
bar beSticky.
slider := bar submorphs first.
slider borderWidth: 0; color: Color black .
+ bar on: #mouseUp send: #value to: [
+ r := bar roomToMove.
+ p := ActiveHand lastEvent position adhereTo: r.
+ bar setValue: ((r bottom - p y ) asFloat / r height ).
+ self setSoundVolume: bar value.
+ self beep:'coyote'.
+ bar delete.
+ ].
-
slider on: #mouseUp send: #value to: [
self setSoundVolume: bar value.
+ self beep:'coyote'.
bar delete].
slider on: #mouseMove send: #value to: [
bar scrollAbsolute: ActiveHand lastEvent.
+ self setSoundVolume: bar value. ].
- self setSoundVolume: bar value. self beep].
^bar openInWorld!
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev